[PATCH] D99273: [DebugInfo] Support for signed constants inside DIExpression
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 26 09:54:20 PDT 2021
aprantl added inline comments.
================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1472
+ getElement(2) != dwarf::DW_OP_stack_value))
return false;
return true;
----------------
dstenb wrote:
> Why do we not allow fragmented expressions here but we do for the unsigned variant?
It's costly to maintain two function that share 95% of their implementation. What would you think about having a single function
`llvm::Optional<enum {unsigned, signed}> DIExpression::isConstant() const;`
instead? Then it can serve as a drop-in replacements for call sites that don't care about the signedness and ones that do still get that information.
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