aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-10-16 01:34:54 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-10-16 01:34:54 +0000
commitfffff915d53361fc575621c5e04ae7df99dd3fab (patch)
treeb824567033767ad857eca8b2ccbddd1228796ad0 /lib/MC
parent7c3600de949347bf5ea6369b2546fac15bd96415 (diff)
downloadexternal_llvm-fffff915d53361fc575621c5e04ae7df99dd3fab.zip
external_llvm-fffff915d53361fc575621c5e04ae7df99dd3fab.tar.gz
external_llvm-fffff915d53361fc575621c5e04ae7df99dd3fab.tar.bz2
MC: When parsing a variable reference, substitute absolute variables immediately
since they are allowed to be redefined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84230 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCAsmStreamer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index e56e968..1a6e8b6 100644
--- a/lib/MC/MCAsmStreamer.cpp
+++ b/lib/MC/MCAsmStreamer.cpp
@@ -123,9 +123,12 @@ void MCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
OS << " = ";
Value->print(OS, &MAI);
OS << '\n';
+
+ // FIXME: Lift context changes into super class.
+ Symbol->setValue(Value);
}
-void MCAsmStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
+void MCAsmStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
SymbolAttr Attribute) {
switch (Attribute) {
case Global: OS << ".globl"; break;