[PATCH] D109109: [MC] Recursively calculate symbol offset
Leonard Grey via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 10 12:50:24 PDT 2021
lgrey added a comment.
I think the root cause is: https://bugs.llvm.org/show_bug.cgi?id=19203. The proximate cause is https://github.com/llvm/llvm-project/blob/main/llvm/lib/MC/MCExpr.cpp#L820.
In the real case that motivated this, we have something like BinaryExpr(SymRefExpr(BinaryExpr(SymRefExpr(Constant) + Constant) + Constant)). Without the MachO special case in MCExpr, this would get reduced to an expression without nested symbols before it makes it to the offset calculation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109109/new/
https://reviews.llvm.org/D109109
More information about the llvm-commits
mailing list