mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 22:17:23 +08:00
Remove raw_svector_ostream::resync and users. It's no-op after r244870.
llvm-svn: 244888
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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()); }
|
||||
};
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user