Stopped emitting function debug info if that function has no code (or alternatively, has no code associated with debug info).
Modified few LIT tests due to this change.
This patch is needed for "D11180" and should be committed first.
Paths
| Differential D12426
Omitting debug info function entry for functions that has no code. Needs ReviewPublic Authored by aaboud on Aug 27 2015, 11:39 PM.
Details
Diff Detail
Event TimelineComment Actions I assume that a function without code will never get inlined, so this should not cause a problem with inlining. Comment Actions
As I said, we need this for the fix in D11180. while (true) { struct nested { static void f2() {} }; nested::f2(); } } Once we start supporting lexical block context for local types (i.e. the structure "nested" in the example), we assume that if a local type is needed, there must be a code in the lexical block containing that type or any of its nested blocks. In the above example (when compiled with "-inline") the lexical block "while" will contain no code, and thus will not be handled or emitted. I discussed this with David, and suggested that we stop emitting such functions that has no association for source line, user will not be able to break in them anyway... So, this is the reason for this patch.
Revision Contents
Diff 33397 lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
test/DebugInfo/X86/dbg-file-name.ll
test/DebugInfo/X86/debug-dead-local-var.ll
test/DebugInfo/cross-cu-linkonce-distinct.ll
test/DebugInfo/nodebug.ll
|