summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-01-09 19:29:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-01-09 19:29:33 +0000
commit8fcd07d53cb678fc6f1c203e61dc302774bb9761 (patch)
treed5c95f9de8cd3d6fd4e83d486dcc4653d41f9b15 /llvm/lib/MC/MCObjectStreamer.cpp
parentf3c832a9700207754d56cc1d041f6ad2290f8d1c (diff)
downloadbcm5719-llvm-8fcd07d53cb678fc6f1c203e61dc302774bb9761.tar.gz
bcm5719-llvm-8fcd07d53cb678fc6f1c203e61dc302774bb9761.zip
Make one of the emitFill methods non virtual. NFC.
This is just preparatory work to fix PR35858. llvm-svn: 322108
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index 15cc0faf540..699cb2dd4b9 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -577,11 +577,6 @@ bool MCObjectStreamer::EmitRelocDirective(const MCExpr &Offset, StringRef Name,
return false;
}
-void MCObjectStreamer::emitFill(uint64_t NumBytes, uint8_t FillValue) {
- assert(getCurrentSectionOnly() && "need a section");
- insert(new MCFillFragment(FillValue, NumBytes));
-}
-
void MCObjectStreamer::emitFill(const MCExpr &NumBytes, uint64_t FillValue,
SMLoc Loc) {
MCDataFragment *DF = getOrCreateDataFragment();
@@ -593,12 +588,13 @@ void MCObjectStreamer::emitFill(const MCExpr &NumBytes, uint64_t FillValue,
return;
}
- if (IntNumBytes <= 0) {
+ if (IntNumBytes < 0) {
getContext().reportError(Loc, "invalid number of bytes");
return;
}
- emitFill(IntNumBytes, FillValue);
+ assert(getCurrentSectionOnly() && "need a section");
+ insert(new MCFillFragment(FillValue, IntNumBytes));
}
void MCObjectStreamer::emitFill(const MCExpr &NumValues, int64_t Size,
OpenPOWER on IntegriCloud