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

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 00:15:16 PST 2019


djtodoro marked an inline comment as done.
djtodoro 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;
----------------
dstenb wrote:
> 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?
In the current design, yes.
DIExpression will always have entry value DWARF operand as first element.



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

https://reviews.llvm.org/D58042





More information about the llvm-commits mailing list