[PATCH] D99273: [DebugInfo] Support for signed constants inside DIExpression
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 16:10:40 PDT 2021
aprantl added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:3236
+ assert(DIE->isUnsignedConstant() &&
"Global constant variables must contain a constant expression.");
----------------
Based on the assertion message though, it sounds like this assertion, for example, really wnats to check for //any// constants?
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:216
+ if (GlobalExprs.size() == 1 && Expr &&
+ (Expr->isUnsignedConstant() || Expr->isSignedConstant())) {
addToAccelTable = true;
----------------
dstenb wrote:
> Can we make a `isConstant()` function in `DIExpression` that wraps these two?
Yes, that would be a good idea.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99273/new/
https://reviews.llvm.org/D99273
More information about the llvm-commits
mailing list