[PATCH] D121107: [DebugInfo][SROA] Correct debug info for global variables in case of SROA
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 8 17:46:58 PST 2022
aprantl added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:411
+
+ // Calculate the offset
+ if (Expr->getNumElements() == 2 &&
----------------
nit: can you end each sentence with a `.` for consistency?
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:414
+ Expr->getElement(0) == dwarf::DW_OP_plus_uconst) {
+ CurVarOffset = 8 * Expr->getElement(1);
+ }
----------------
This hardcoded 8 looks suspicious. What is it derived from and why is it a constant?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121107/new/
https://reviews.llvm.org/D121107
More information about the llvm-commits
mailing list