From: Yaron Keren Date: Thu, 13 Aug 2015 12:42:25 +0000 (+0000) Subject: Remove raw_svector_ostream::resync and users. It's no-op after r244870. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e65e298541646322234f94dab3387b165e65f704;p=oota-llvm.git Remove raw_svector_ostream::resync and users. It's no-op after r244870. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244888 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index 5000774a6cd..138d811a44a 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -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()); } }; diff --git a/lib/IR/Type.cpp b/lib/IR/Type.cpp index 7f65e941f91..fbcd887ec68 100644 --- a/lib/IR/Type.cpp +++ b/lib/IR/Type.cpp @@ -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( diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 6fdc08670f1..ae482a0fd00 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -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) { diff --git a/lib/MC/MCDisassembler/Disassembler.cpp b/lib/MC/MCDisassembler/Disassembler.cpp index 716d76a79fe..f8260af53c9 100644 --- a/lib/MC/MCDisassembler/Disassembler.cpp +++ b/lib/MC/MCDisassembler/Disassembler.cpp @@ -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 diff --git a/tools/dsymutil/DwarfLinker.cpp b/tools/dsymutil/DwarfLinker.cpp index 4231b14fbed..b37e260e916 100644 --- a/tools/dsymutil/DwarfLinker.cpp +++ b/tools/dsymutil/DwarfLinker.cpp @@ -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); diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index cda28c48611..8171a3e9815 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -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, diff --git a/utils/TableGen/FixedLenDecoderEmitter.cpp b/utils/TableGen/FixedLenDecoderEmitter.cpp index 791e853c025..994039e7c39 100644 --- a/utils/TableGen/FixedLenDecoderEmitter.cpp +++ b/utils/TableGen/FixedLenDecoderEmitter.cpp @@ -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)