Remove raw_svector_ostream::resync and users. It's no-op after r244870.
authorYaron Keren <yaron.keren@gmail.com>
Thu, 13 Aug 2015 12:42:25 +0000 (12:42 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Thu, 13 Aug 2015 12:42:25 +0000 (12:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244888 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/raw_ostream.h
lib/IR/Type.cpp
lib/MC/MCAsmStreamer.cpp
lib/MC/MCDisassembler/Disassembler.cpp
tools/dsymutil/DwarfLinker.cpp
tools/llvm-objdump/MachODump.cpp
utils/TableGen/FixedLenDecoderEmitter.cpp

index 5000774a6cdb797f1abe7f8dd609a4e7c6ac5fa8..138d811a44a694b2777eb61c2b3d61ad00013972 100644 (file)
@@ -509,9 +509,6 @@ public:
   }
   ~raw_svector_ostream() override {}
 
-  // FIXME: resync is no-op. Remove it and its users.
-  void resync() {}
-
   /// Return a StringRef for the vector contents.
   StringRef str() { return StringRef(OS.data(), OS.size()); }
 };
index 7f65e941f914458df0641ac508097a512bacadd5..fbcd887ec68e1027d3011064e91ca192e4d4676b 100644 (file)
@@ -464,7 +464,6 @@ void StructType::setName(StringRef Name) {
    
     do {
       TempStr.resize(NameSize + 1);
-      TmpStream.resync();
       TmpStream << getContext().pImpl->NamedStructTypesUniqueID++;
 
       IterBool = getContext().pImpl->NamedStructTypes.insert(
index 6fdc08670f15117177cfc7617f28b6a0405718a3..ae482a0fd00da28699c993e1f5173e9d3363588b 100644 (file)
@@ -259,9 +259,6 @@ void MCAsmStreamer::AddComment(const Twine &T) {
   T.toVector(CommentToEmit);
   // Each comment goes on its own line.
   CommentToEmit.push_back('\n');
-
-  // Tell the comment stream that the vector changed underneath it.
-  CommentStream.resync();
 }
 
 void MCAsmStreamer::EmitCommentsAndEOL() {
@@ -285,8 +282,6 @@ void MCAsmStreamer::EmitCommentsAndEOL() {
   } while (!Comments.empty());
 
   CommentToEmit.clear();
-  // Tell the comment stream that the vector changed underneath it.
-  CommentStream.resync();
 }
 
 static inline int64_t truncateToSize(int64_t Value, unsigned Bytes) {
index 716d76a79fe354d29d5e3dccbb4edd287dfc95cc..f8260af53c90f94d78ae44d96935dc972f0b4925 100644 (file)
@@ -147,7 +147,6 @@ static void emitComments(LLVMDisasmContext *DC,
 
   // Tell the comment stream that the vector changed underneath it.
   DC->CommentsToEmit.clear();
-  DC->CommentStream.resync();
 }
 
 /// \brief Gets latency information for \p Inst from the itinerary
index 4231b14fbedafc2a68c6329b4b3ec0dea082d54a..b37e260e916b566ca276c888123fa6ad73f93a89 100644 (file)
@@ -1053,7 +1053,6 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
       MS->EmitBytes(EncodingOS.str());
       LineSectionSize += EncodingBuffer.size();
       EncodingBuffer.resize(0);
-      EncodingOS.resync();
       Address = Row.Address;
       LastLine = Row.Line;
       RowsSinceLastSequence++;
@@ -1072,7 +1071,6 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
       MS->EmitBytes(EncodingOS.str());
       LineSectionSize += EncodingBuffer.size();
       EncodingBuffer.resize(0);
-      EncodingOS.resync();
       Address = -1ULL;
       LastLine = FileNum = IsStatement = 1;
       RowsSinceLastSequence = Column = Isa = 0;
@@ -1084,7 +1082,6 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
     MS->EmitBytes(EncodingOS.str());
     LineSectionSize += EncodingBuffer.size();
     EncodingBuffer.resize(0);
-    EncodingOS.resync();
   }
 
   MS->EmitLabel(LineEndSym);
index cda28c48611616def0aba2782e40b7244cb12c7e..8171a3e9815cdf1587b587f9716d3cf1216071a9 100644 (file)
@@ -5888,7 +5888,6 @@ static void emitComments(raw_svector_ostream &CommentStream,
 
   // Tell the comment stream that the vector changed underneath it.
   CommentsToEmit.clear();
-  CommentStream.resync();
 }
 
 static void DisassembleMachO(StringRef Filename, MachOObjectFile *MachOOF,
index 791e853c025e6e4c0d10cf8b5b5c6f94cb072d6e..994039e7c3957148ccb63b519416afc4342bfee5 100644 (file)
@@ -1290,14 +1290,12 @@ void FilterChooser::emitSoftFailTableEntry(DecoderTableInfo &TableInfo,
   raw_svector_ostream S(MaskBytes);
   if (NeedPositiveMask) {
     encodeULEB128(PositiveMask.getZExtValue(), S);
-    S.flush();
     for (unsigned i = 0, e = MaskBytes.size(); i != e; ++i)
       TableInfo.Table.push_back(MaskBytes[i]);
   } else
     TableInfo.Table.push_back(0);
   if (NeedNegativeMask) {
     MaskBytes.clear();
-    S.resync();
     encodeULEB128(NegativeMask.getZExtValue(), S);
     S.flush();
     for (unsigned i = 0, e = MaskBytes.size(); i != e; ++i)