diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-01-09 22:48:37 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-01-09 22:48:37 +0000 |
commit | d707c37072195e1e05edd8765b3f4bd79955b154 (patch) | |
tree | a9b9ceb62118f4b224669ece9819e1c0c263d39b /llvm/lib/MC/MCObjectStreamer.cpp | |
parent | 270ed1b39c1727c14b539c5287a4fa74d8307594 (diff) | |
download | bcm5719-llvm-d707c37072195e1e05edd8765b3f4bd79955b154.tar.gz bcm5719-llvm-d707c37072195e1e05edd8765b3f4bd79955b154.zip |
Use a MCExpr for the size of MCFillFragment.
This allows the size to be found during ralaxation. This fixes
pr35858.
llvm-svn: 322131
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index 49fa4bb7dfa..230c02188a6 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -582,19 +582,8 @@ void MCObjectStreamer::emitFill(const MCExpr &NumBytes, uint64_t FillValue, MCDataFragment *DF = getOrCreateDataFragment(); flushPendingLabels(DF, DF->getContents().size()); - int64_t IntNumBytes; - if (!NumBytes.evaluateAsAbsolute(IntNumBytes, getAssembler())) { - getContext().reportError(Loc, "expected absolute expression"); - return; - } - - if (IntNumBytes < 0) { - getContext().reportError(Loc, "invalid number of bytes"); - return; - } - assert(getCurrentSectionOnly() && "need a section"); - insert(new MCFillFragment(FillValue, IntNumBytes)); + insert(new MCFillFragment(FillValue, NumBytes, Loc)); } void MCObjectStreamer::emitFill(const MCExpr &NumValues, int64_t Size, |