diff options
author | Reid Kleckner <rnk@google.com> | 2016-05-25 23:29:08 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-05-25 23:29:08 +0000 |
commit | 63d3d6df7d31a926a64dd15ce81d3e20002b4555 (patch) | |
tree | c45ab9c238f1f7c38b0aed28811afa1538646232 /llvm/lib/MC/MCObjectStreamer.cpp | |
parent | 684ec17cd9d5828f549c6ea5d6cc6395f68cabdf (diff) | |
download | bcm5719-llvm-63d3d6df7d31a926a64dd15ce81d3e20002b4555.tar.gz bcm5719-llvm-63d3d6df7d31a926a64dd15ce81d3e20002b4555.zip |
Revert "[MC] Support symbolic expressions in assembly directives"
This reverts commit r270786, it causes the directive_fill.s to fail.
llvm-svn: 270795
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index bf7d0f241c0..b90f0a80cfe 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -20,7 +20,6 @@ #include "llvm/MC/MCSection.h" #include "llvm/MC/MCSymbol.h" #include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/SourceMgr.h" #include "llvm/Support/TargetRegistry.h" using namespace llvm; @@ -497,43 +496,6 @@ void MCObjectStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) { insert(new MCFillFragment(FillValue, NumBytes)); } -void MCObjectStreamer::emitFill(const MCExpr &NumBytes, uint64_t FillValue, - SMLoc Loc) { - 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; - } - - EmitFill(IntNumBytes, FillValue); -} - -void MCObjectStreamer::emitFill(const MCExpr &NumValues, int64_t Size, - int64_t Expr, SMLoc Loc) { - int64_t IntNumValues; - if (!NumValues.evaluateAsAbsolute(IntNumValues, getAssembler())) { - getContext().reportError(Loc, "expected absolute expression"); - return; - } - - if (IntNumValues < 0) { - getContext().getSourceManager()->PrintMessage( - Loc, SourceMgr::DK_Warning, - "'.fill' directive with negative repeat count has no effect"); - return; - } - - MCStreamer::emitFill(IntNumValues, Size, Expr); -} - void MCObjectStreamer::FinishImpl() { // If we are generating dwarf for assembly source files dump out the sections. if (getContext().getGenDwarfForAssembly()) |