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 | 293a7c184007acfe584e159adee491c85e0bbdd4 (patch) | |
tree | 02f089901b19dbf4a0ad6a749dce1fdfd9988ef8 /llvm/lib | |
parent | 092b55542f48b6fed69a3b8ee6e9ecf89770a607 (diff) | |
download | bcm5719-llvm-293a7c184007acfe584e159adee491c85e0bbdd4.tar.gz bcm5719-llvm-293a7c184007acfe584e159adee491c85e0bbdd4.zip |
Add a FIXME and explain a hack.
llvm-svn: 122144
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index 8c24ce5d6b8..3533da2cf64 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/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 |