[PATCH] D91722: [DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands
Stephen Tozer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 09:50:57 PST 2020
StephenTozer added inline comments.
================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:2591
+ /// (0 and 1).
+ uint64_t getLocationOperandCount() const;
+
----------------
aprantl wrote:
> to be in line with the other method names: `getNumLocationOperands()` or `getNumLocationRefs()` or `getNumArgOps()`...?
> If wee get super nerdy, I think technically these are operators (that operate on the DWARF stack) and not operands :-)
Sounds good to me! And wrt the nerdy point, I think that's actually an advantageous semantic point here: the intent of this function is actually to get the number of //location operands// that the DIExpression refers to, as opposed to the number of actual operators of a given type (i.e. for the nonsensical expression `DIExpression(DW_OP_LLVM_arg 0, DW_OP_LLVM_arg 0, DW_OP_LLVM_arg 0)` we still only refer to one location operand).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91722/new/
https://reviews.llvm.org/D91722
More information about the llvm-commits
mailing list