summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-10-16 01:58:03 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-10-16 01:58:03 +0000
commit8e6d889d4c3b89b3cb2dd48cdca3dce4f90d5778 (patch)
tree86d588bd4e027f5f0b8536c7c066b577a84e14f8 /llvm/lib/MC/MCMachOStreamer.cpp
parentc3bd60e393ca3b9f640051a1b4c1eff6c1f9cd61 (diff)
downloadbcm5719-llvm-8e6d889d4c3b89b3cb2dd48cdca3dce4f90d5778.tar.gz
bcm5719-llvm-8e6d889d4c3b89b3cb2dd48cdca3dce4f90d5778.zip
MC: Switch assembler API to using MCExpr instead of MCValue.
llvm-svn: 84234
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCMachOStreamer.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp
index b592391c512..9f8841ecb97 100644
--- a/llvm/lib/MC/MCMachOStreamer.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud