[llvm] [BOLT] Check if symbol is in data area of function (PR #160143)
Asher Dobrescu via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 08:46:44 PDT 2025
================
@@ -2374,8 +2374,16 @@ BinaryFunction *BinaryContext::getFunctionForSymbol(const MCSymbol *Symbol,
return nullptr;
BinaryFunction *BF = BFI->second;
- if (EntryDesc)
+ if (EntryDesc) {
+ const uint64_t Address = BF->getAddress() + Symbol->getOffset();
----------------
Asher8118 wrote:
It's now returning an optional. I did keep the `Symbol->getOffset()` check in order to give a warning to the user, but we are no longer relying on it to avoid the`llvm_unreachable`.
https://github.com/llvm/llvm-project/pull/160143
More information about the llvm-commits
mailing list