[PATCH] D46738: [DebugInfo] Fix PR37395.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 21 08:52:41 PDT 2018
aprantl added a comment.
> getVariableLocation() assumes all DbgInfoIntrinsic has the address value as its first operand. It is not the case for DILabel.
> When the assertion is triggered, MDNode is DILabel. The first operand of DILabel is a metadata to keep label information, not address value. So, the second if contition, dyn_cast<ValueAsMetadata>, will return null.
> It adds an assertion to ensure the number of operand must be zero before returning nullptr. I am not sure it is reasonable to check the condition before return. Is there any case it must ensure the number of operands be zero before returning nullptr?
Why aren't you checking whether `this` is a DILabel instead?
Repository:
rL LLVM
https://reviews.llvm.org/D46738
More information about the llvm-commits
mailing list