summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCELFStreamer.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-08-13 18:12:56 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-08-13 18:12:56 +0000
commit556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc (patch)
treec0a5083d290ea0d5138c674e1a5a8019816b76c9 /llvm/lib/MC/MCELFStreamer.cpp
parent1dbb95151b0ed90ba376a1da90a1bd1eb9364e12 (diff)
downloadbcm5719-llvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.tar.gz
bcm5719-llvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.zip
Remove and forbid raw_svector_ostream::flush() calls.
After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCELFStreamer.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index 7588ea38823..9a64baa4f13 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -68,7 +68,6 @@ void MCELFStreamer::mergeFragment(MCDataFragment *DF,
EF->setBundlePadding(static_cast<uint8_t>(RequiredBundlePadding));
Assembler.writeFragmentPadding(*EF, FSize, OW);
- VecOS.flush();
delete OW;
DF->getContents().append(Code.begin(), Code.end());
@@ -480,7 +479,6 @@ void MCELFStreamer::EmitInstToData(const MCInst &Inst,
SmallString<256> Code;
raw_svector_ostream VecOS(Code);
Assembler.getEmitter().encodeInstruction(Inst, VecOS, Fixups, STI);
- VecOS.flush();
for (unsigned i = 0, e = Fixups.size(); i != e; ++i)
fixSymbolsInTLSFixups(Fixups[i].getValue());
OpenPOWER on IntegriCloud