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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 09:50:14 PDT 2021


aprantl added inline comments.


================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1464
+
+  // Recognize singned and unsigned constants.
+  // An signed constants can be represented as DW_OP_consts C DW_OP_stack_value
----------------
`signed`


================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1466
+  // An signed constants can be represented as DW_OP_consts C DW_OP_stack_value
+  // (DW_OP_LLVM_fragment Len.
+  // An unsigned constant can be represented as
----------------
is there a missing `Ofs` and `)` here?


================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1477
+  if (getNumElements() == 2)
+    return SignedOrUnsignedConstant::SignedConstant;
+
----------------
Shouldn't this compare getElement(0)?


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