diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-18 04:19:20 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-18 04:19:20 +0000 |
commit | 3f037ef2f52769e0ee9b038177242611fe19d547 (patch) | |
tree | 11df2e7f4f532d640ebc3aa7bd1ac4e2dfe427ae /lib/MC/MCExpr.cpp | |
parent | 47e8ae6324c305991a566458fe2de2034ed9ce48 (diff) | |
download | external_llvm-3f037ef2f52769e0ee9b038177242611fe19d547.zip external_llvm-3f037ef2f52769e0ee9b038177242611fe19d547.tar.gz external_llvm-3f037ef2f52769e0ee9b038177242611fe19d547.tar.bz2 |
Add a FIXME and explain a hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCExpr.cpp')
-rw-r--r-- | lib/MC/MCExpr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index 8c24ce5..3533da2 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -267,7 +267,10 @@ bool MCExpr::EvaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm, return true; } - if (!EvaluateAsRelocatableImpl(Value, Asm, Layout, Addrs, Addrs) || + // FIXME: The use if InSet = Addrs is a hack. Setting InSet causes us + // absolutize differences across sections and that is what the MachO writer + // uses Addrs for. + if (!EvaluateAsRelocatableImpl(Value, Asm, Layout, Addrs, /*InSet*/ Addrs) || !Value.isAbsolute()) { // EvaluateAsAbsolute is defined to return the "current value" of // the expression if we are given a Layout object, even in cases |