[PATCH] D58042: [LiveDebugValues] Emit parameter's entry value
Nikola Prica via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 14 03:05:41 PST 2019
NikolaPrica 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:
> 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!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58042/new/
https://reviews.llvm.org/D58042
More information about the llvm-commits
mailing list