Add a new wrapper node for a DILexicalBlock that encapsulates it and a

file. Since it should only be used when necessary propagate it through
the backend code generation and tweak testcases accordingly.

This helps with code like in clang's test/CodeGen/debug-info-line.c where
we have multiple #line directives within a single lexical block and want
to generate only a single block that contains each file change.

Part of rdar://10246360

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141729 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2011-10-11 22:59:11 +00:00
parent 5ba7b501fd
commit 6618a241f7
10 changed files with 115 additions and 10 deletions
+14 -1
View File
@@ -472,10 +472,23 @@ global variables are collected by named metadata <tt>!llvm.dbg.gv</tt>.</p>
</pre>
</div>
<p>These descriptors provide debug information about nested blocks within a
<p>This descriptor provides debug information about nested blocks within a
subprogram. The line number and column numbers are used to dinstinguish
two lexical blocks at same depth. </p>
<div class="doc_code">
<pre>
!3 = metadata !{
i32, ;; Tag = 11 + <a href="#LLVMDebugVersion">LLVMDebugVersion</a> (DW_TAG_lexical_block)
metadata ;; Reference to the scope we're annotating with a file change
metadata,;; Reference to the file the scope is enclosed in.
}
</pre>
</div>
<p>This descriptor provides a wrapper around a lexical scope to handle file
changes in the middle of a lexical block.</p>
</div>
<!-- ======================================================================= -->