diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-10-16 01:58:03 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-10-16 01:58:03 +0000 |
commit | 1253a6fa3b0d79dc6ea25f2578f6473219d40047 (patch) | |
tree | 1b3f120ec29b538a54df30bf421bf722a8e228aa /lib/MC/MCMachOStreamer.cpp | |
parent | e00b011e6a2597fcc3da88da91a8ffda6eebfcda (diff) |
MC: Switch assembler API to using MCExpr instead of MCValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCMachOStreamer.cpp')
-rw-r--r-- | lib/MC/MCMachOStreamer.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp index b592391c51..9f8841ecb9 100644 --- a/lib/MC/MCMachOStreamer.cpp +++ b/lib/MC/MCMachOStreamer.cpp @@ -321,12 +321,7 @@ void MCMachOStreamer::EmitBytes(const StringRef &Data) { } void MCMachOStreamer::EmitValue(const MCExpr *Value, unsigned Size) { - MCValue RelocValue; - - if (!AddValueSymbols(Value)->EvaluateAsRelocatable(getContext(), RelocValue)) - return llvm_report_error("expected relocatable expression"); - - new MCFillFragment(RelocValue, Size, 1, CurSectionData); + new MCFillFragment(*AddValueSymbols(Value), Size, 1, CurSectionData); } void MCMachOStreamer::EmitValueToAlignment(unsigned ByteAlignment, @@ -344,12 +339,7 @@ void MCMachOStreamer::EmitValueToAlignment(unsigned ByteAlignment, void MCMachOStreamer::EmitValueToOffset(const MCExpr *Offset, unsigned char Value) { - MCValue RelocOffset; - - if (!AddValueSymbols(Offset)->EvaluateAsRelocatable(RelocOffset)) - return llvm_report_error("expected relocatable expression"); - - new MCOrgFragment(RelocOffset, Value, CurSectionData); + new MCOrgFragment(*Offset, Value, CurSectionData); } void MCMachOStreamer::EmitInstruction(const MCInst &Inst) { |