summaryrefslogtreecommitdiffstats
path: root/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-10-23 14:19:52 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-10-23 14:19:52 +0000
commit9643cca39fb9fb3b49a8912926de98acf882283c (patch)
tree22cc59e4b240d84c3a5a60531119c4eca914a256 /lib/MC/MCMachOStreamer.cpp
parent1adacceba9c9ee0f16e54388e56c9a249b296f75 (diff)
downloadFreeBSD-src-9643cca39fb9fb3b49a8912926de98acf882283c.zip
FreeBSD-src-9643cca39fb9fb3b49a8912926de98acf882283c.tar.gz
Update LLVM to r84949.
Diffstat (limited to 'lib/MC/MCMachOStreamer.cpp')
-rw-r--r--lib/MC/MCMachOStreamer.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp
index e04bd1f..189f072 100644
--- a/lib/MC/MCMachOStreamer.cpp
+++ b/lib/MC/MCMachOStreamer.cpp
@@ -198,7 +198,9 @@ void MCMachOStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
assert((Symbol->isUndefined() || Symbol->isAbsolute()) &&
"Cannot define a symbol twice!");
- llvm_unreachable("FIXME: Not yet implemented!");
+ // FIXME: Lift context changes into super class.
+ // FIXME: Set associated section.
+ Symbol->setValue(Value);
}
void MCMachOStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
@@ -321,12 +323,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,13 +341,7 @@ void MCMachOStreamer::EmitValueToAlignment(unsigned ByteAlignment,
void MCMachOStreamer::EmitValueToOffset(const MCExpr *Offset,
unsigned char Value) {
- MCValue RelocOffset;
-
- if (!AddValueSymbols(Offset)->EvaluateAsRelocatable(getContext(),
- 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