[PATCH] D58042: [LiveDebugValues] Emit parameter's entry value

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 13:19:42 PST 2019


dstenb added inline comments.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:445-447
+    for (auto I = Expr->expr_op_begin(), E = Expr->expr_op_end(); I != E; I++)
+      if (I->getOp() == dwarf::DW_OP_GNU_entry_value)
+        K = VarLoc::EntryValueKind;
----------------
Should this use `Expr->isEntryValue()`? However, the implementation of that function in D58041 only checks if the first element is the operation:

```
bool isEntryValue() const {
    return getNumElements() > 0 && getElement(0) == dwarf::DW_OP_GNU_entry_value;
}
```

Is that correct, or should it look through all elements like is done here? Or is there some reason for why they should be disjunct? If so, could you add a comment here?


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

https://reviews.llvm.org/D58042





More information about the llvm-commits mailing list