[PATCH] D46738: [DebugInfo] Fix PR37395.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 6 23:14:59 PDT 2018


HsiangKai added a comment.

In https://reviews.llvm.org/D46738#1124484, @aprantl wrote:

> If that is the case then you should be able to write the assertion as
>
> `assert((isa<DILabelInst>() || !cast<MDNode>(MD)->getNumOperands()) && ...);`
>
> without guarding it in if (AllowNullOp). I'd be more comfortable this way since it is more explicit in that dbg.value's may not have null arguments. My point is that a dbg.value with a null argument is indicative of a compiler bug. We need to relax the assertion in order to support dbg.label (that's fine) but while doing that we shouldn't also relax it for dbg.value. Please let me know if I'm misunderstanding something.


I got your point. I will update the patch as you mentioned. Thanks.


Repository:
  rL LLVM

https://reviews.llvm.org/D46738





More information about the llvm-commits mailing list