Remove raw_svector_ostream::resync and users. It's no-op after r244870.

llvm-svn: 244888
This commit is contained in:
Yaron Keren
2015-08-13 12:42:25 +00:00
parent 6153698f26
commit a3668a3fcd
8 changed files with 0 additions and 18 deletions

View File

@@ -6780,9 +6780,7 @@ static bool extractFieldType(SmallVectorImpl<FieldEncoding> &FE,
if (Field->isBitField()) {
Enc += "b(";
llvm::raw_svector_ostream OS(Enc);
OS.resync();
OS << Field->getBitWidthValue(CGM.getContext());
OS.flush();
Enc += ':';
}
if (!appendType(Enc, Field->getType(), CGM, TSC))

View 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()); }
};

View 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(

View 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) {

View 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

View 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);

View 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,

View 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)