[PATCH] D37364: [DWARF] Line 0 should not have a discriminator

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 10:37:14 PDT 2017


On Tue, Sep 5, 2017 at 10:22 AM Paul Robinson via Phabricator <
reviews at reviews.llvm.org> wrote:

> probinson added a comment.
>
> In https://reviews.llvm.org/D37364#860065, @danielcdh wrote:
>
> > The change looks good to me. But the test is quite large and hard to
> understand. I don't think it's necessary to have the test generated from a
> source file, just forge a test with discriminator attached to line 0, and
> then checks if discriminators is omitted in the generated code. I guess it
> should suffice with < 20 LOC
>
>
> If the IR explicitly has a line 0 location with a nonzero discriminator, I
> think DwarfDebug should obediently emit that (or assert).
> The point of this patch is that when DwarfDebug *implicitly* emits a line
> 0 record, a preceding discriminator should not "pollute" that.
>

Same idea, though - test might be easier to understand if it's a bit
hand-crafted. (mostly writing all the debug metadata's the thing avoided by
generating from C or C++ source - tweaking a few instructions (especially
if it gets down to only a handful, like most LLVM IR (non-debug info &
debug info alike) test cases))


>
>
> https://reviews.llvm.org/D37364
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170905/8075e381/attachment.html>


More information about the llvm-commits mailing list