[PATCH] D99273: [DebugInfo] Support for signed constants inside DIExpression
Sourabh Singh Tomar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 29 12:27:36 PDT 2021
SouraVX marked an inline comment as done.
SouraVX added inline comments.
================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1472
+ getElement(2) != dwarf::DW_OP_stack_value))
return false;
return true;
----------------
aprantl wrote:
> 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.
>
Thanks for the suggestion! I went a little ahead and did it in a more functional way, preserving the semantics in individual lambdas.
Please let me know, WDYT ?
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