[llvm-dev] The meaning of DILexicalBlockFile
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Fri Feb 1 07:36:44 PST 2019
Best way to find source examples to see how IRconstructs are used to
represent them is to look in Clang's tests for the IR construct you're
interested in.
In this case, clang's test/CodeGen/debug-info-file-change.c demonstrates
source code that generates DILexicalBlockFile.
On Thu, Jan 31, 2019 at 10:15 AM Peng Yu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> The langref says the following. But I don't quite understand them. Can
> somebody show some C code and how the corresponding debug info will be
> encoded in the IR using DILexicalBlockFile? Thanks.
>
> DILexicalBlockFile nodes are used to discriminate between sections of
> a lexical block. The file: field can be changed to indicate textual
> inclusion, or the discriminator: field can be used to discriminate
> between control flow within a single block in the source language.
>
> !0 = !DILexicalBlock(scope: !3, file: !4, line: 7, column: 35)
> !1 = !DILexicalBlockFile(scope: !0, file: !4, discriminator: 0)
> !2 = !DILexicalBlockFile(scope: !0, file: !4, discriminator: 1)
>
> --
> Regards,
> Peng
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190201/cfe63680/attachment.html>
More information about the llvm-dev
mailing list