[PATCH] D59687: [DebugInfo] Prologue inserter need to insert DW_OP_deref_size

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 10:00:19 PDT 2019


aprantl accepted this revision.
aprantl added inline comments.
This revision is now accepted and ready to land.


================
Comment at: include/llvm/IR/DebugInfoMetadata.h:2512
+  /// Return whether this is an implicit location description.
+  bool isImplicit() const {
+    if (isValid()) {
----------------
Thanks! I think the function is too long for an inline definition now, so let's move it into the .cpp file.


================
Comment at: include/llvm/IR/DebugInfoMetadata.h:2517
+        return true;
+      else if (N > 1 && getElement(N-1) == dwarf::DW_OP_LLVM_fragment &&
+               getElement(N-2) == dwarf::DW_OP_stack_value)
----------------
the  `else` is redundant

Is this better? I'm not actually sure...
```
if (N == 0)
  return false;
switch (getElement(N-1)) {
  case dwarf::DW_OP_stack_value: return true;
  case dwarf::DW_OP_LLVM_fragment:
     return N > 1 && getElement(N-2) == dwarf::DW_OP_stack_value;
  default: return true;
}
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59687/new/

https://reviews.llvm.org/D59687





More information about the llvm-commits mailing list