aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCSymbol.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-05 19:01:05 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-05 19:01:05 +0000
commit2d7fd61e94e2db0586ad9d5d26c1e7c5510a006d (patch)
treea2454219fc120589f4fd74786a1b24437b223159 /lib/MC/MCSymbol.cpp
parentc304718fd8fa25f3f36f47f3de0e0cfe7578bc9e (diff)
MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
writing them. - <rdar://problem/7885351> integrated assembler broken for i386 objc code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCSymbol.cpp')
-rw-r--r--lib/MC/MCSymbol.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/MC/MCSymbol.cpp b/lib/MC/MCSymbol.cpp
index 82d72a3e95..07751f7298 100644
--- a/lib/MC/MCSymbol.cpp
+++ b/lib/MC/MCSymbol.cpp
@@ -44,6 +44,10 @@ void MCSymbol::setVariableValue(const MCExpr *Value) {
assert((isUndefined() || (isAbsolute() && isa<MCConstantExpr>(Value))) &&
"Invalid redefinition!");
this->Value = Value;
+
+ // Mark the variable as absolute as appropriate.
+ if (isa<MCConstantExpr>(Value))
+ setAbsolute();
}
void MCSymbol::print(raw_ostream &OS) const {