aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-11-05 00:10:08 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-11-05 00:10:08 +0000
commitb23f57832afb61170f95b122d65218cf2bbbcfd1 (patch)
treeae0ce88aa941f16cac432ee007c331d9d14b4488 /llvm/lib/MC/MCObjectStreamer.cpp
parentb035cd7ea4d59e7e76412940351f693ec421e15e (diff)
downloadllvm-b23f57832afb61170f95b122d65218cf2bbbcfd1.zip
llvm-b23f57832afb61170f95b122d65218cf2bbbcfd1.tar.gz
llvm-b23f57832afb61170f95b122d65218cf2bbbcfd1.tar.bz2
Fix pr24832.
It is pretty simple now that the yak is shaved. llvm-svn: 252105
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index f992371..c47e216 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -417,18 +417,10 @@ void MCObjectStreamer::EmitGPRel64Value(const MCExpr *Value) {
}
void MCObjectStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
- // FIXME: A MCFillFragment would be more memory efficient but MCExpr has
- // problems evaluating expressions across multiple fragments.
- MCDataFragment *DF = getOrCreateDataFragment();
- flushPendingLabels(DF, DF->getContents().size());
- DF->getContents().append(NumBytes, FillValue);
-}
-
-void MCObjectStreamer::EmitZeros(uint64_t NumBytes) {
const MCSection *Sec = getCurrentSection().first;
assert(Sec && "need a section");
unsigned ItemSize = Sec->isVirtualSection() ? 0 : 1;
- insert(new MCFillFragment(0, ItemSize, NumBytes));
+ insert(new MCFillFragment(FillValue, ItemSize, NumBytes));
}
void MCObjectStreamer::FinishImpl() {