[PATCH] D48837: [DebugInfo] Corrections for salvageDebugInfo
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 2 09:54:45 PDT 2018
bjope added inline comments.
================
Comment at: lib/IR/DebugInfoMetadata.cpp:808
+ if (Ops.empty())
+ StackValue = false;
if (Expr)
----------------
vsk wrote:
> Is there a reason to allow callers to convert an expression into a stack value without adding any opcodes? Why not assert this can't happen?
I was actually thinking about using an assert here. I did "git grep DIExpression::prepend" and found out that some users of DIExpression::prepend/DIExpression::prependOpcodes explicitly avoids calling those function with a zero Offset (or empty Ops vector), but some don't (an example is SelectionDAG::salvageDebugInfo). So I did not dare to add an assert.
Repository:
rL LLVM
https://reviews.llvm.org/D48837
More information about the llvm-commits
mailing list