<div dir="ltr">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.<br><br>In this case, clang's test/CodeGen/debug-info-file-change.c demonstrates source code that generates DILexicalBlockFile.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 31, 2019 at 10:15 AM Peng Yu via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
The langref says the following. But I don't quite understand them. Can<br>
somebody show some C code and how the corresponding debug info will be<br>
encoded in the IR using DILexicalBlockFile? Thanks.<br>
<br>
DILexicalBlockFile nodes are used to discriminate between sections of<br>
a lexical block. The file: field can be changed to indicate textual<br>
inclusion, or the discriminator: field can be used to discriminate<br>
between control flow within a single block in the source language.<br>
<br>
!0 = !DILexicalBlock(scope: !3, file: !4, line: 7, column: 35)<br>
!1 = !DILexicalBlockFile(scope: !0, file: !4, discriminator: 0)<br>
!2 = !DILexicalBlockFile(scope: !0, file: !4, discriminator: 1)<br>
<br>
-- <br>
Regards,<br>
Peng<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>