[PATCH] D99273: [DebugInfo] Support for signed constants inside DIExpression

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 25 10:06:49 PDT 2021


SouraVX marked an inline comment as done.
SouraVX added inline comments.


================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1471
+  if ((getNumElements() == 2 && getElement(0) != dwarf::DW_OP_consts) ||
+      (getNumElements() == 3 && getElement(0) != dwarf::DW_OP_consts &&
+       getElement(2) != dwarf::DW_OP_stack_value))
----------------
jmorse wrote:
> I may have mis-read, but shouldn't the end `&&` on this line be `||`? Either the zeroth element not being consts, *or* the second element not being stack value, would mean this doesn't match the constant pattern, no?
> 
> Additionally: shouldn't there be a clause for `getNumElements() == 6` here? Otherwise, any six element expression with a fragment suffix will be identified a constant by this function, regardless of the first three elements.
Taken care thanks!


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