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

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 18 05:08:38 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;
----------------
NikolaPrica wrote:
> dstenb wrote:
> > 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?
> You are right! It should be //isEntryValue()//! Thanks!
Okay, thanks for the clarification. So `DW_OP_GNU_entry_value` will only be located in the first element then?


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

https://reviews.llvm.org/D58042





More information about the llvm-commits mailing list