diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-10-21 18:00:20 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-10-21 18:00:20 +0000 |
commit | 8c8bc05a383890ab29b288625c746bf24240e9a1 (patch) | |
tree | c8acd442ac99960bfca63cd4f577199dd53b0816 /lib | |
parent | 0b9325c97d031ab0e9a240d69a2be11ec1559e37 (diff) | |
download | external_llvm-8c8bc05a383890ab29b288625c746bf24240e9a1.zip external_llvm-8c8bc05a383890ab29b288625c746bf24240e9a1.tar.gz external_llvm-8c8bc05a383890ab29b288625c746bf24240e9a1.tar.bz2 |
Do not recurse into symbol refs that have a variant kind. This prevents us
from losing the variant when producing a relocation on an alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/MCExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index 3524b80..abc3b51 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -306,7 +306,7 @@ bool MCExpr::EvaluateAsRelocatableImpl(MCValue &Res, const MCSymbol &Sym = SRE->getSymbol(); // Evaluate recursively if this is a variable. - if (Sym.isVariable()) + if (Sym.isVariable() && SRE->getKind() == MCSymbolRefExpr::VK_None) return Sym.getVariableValue()->EvaluateAsRelocatableImpl(Res, Layout, true); |