summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-05-27 18:37:43 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-05-27 18:37:43 +0000
commitf7221adb8ed6e60ac3e97ab528ec2e4c2e18fc79 (patch)
tree94f689b8a8b08e6c0beb83482ca9d28acc469f42 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
parent7f91686f07df6adfe101b8835d01aa8e32128c6c (diff)
downloadbcm5719-llvm-f7221adb8ed6e60ac3e97ab528ec2e4c2e18fc79.tar.gz
bcm5719-llvm-f7221adb8ed6e60ac3e97ab528ec2e4c2e18fc79.zip
DebugInfo: Lazily attach definition attributes to definitions.
This is a precursor to fixing inlined debug info where the concrete, out-of-line definition may preceed any inlined usage. To cope with this, the attributes that may appear on the concrete definition or the abstract definition are delayed until the end of the module. Then, if an abstract definition was created, it is referenced (and no other attributes are added to the out-of-line definition), otherwise the attributes are added directly to the out-of-line definition. In a couple of cases this causes not just reordering of attributes, but reordering of types. When the creation of the attribute is delayed, if that creation would create a type (such as for a DW_AT_type attribute) then other top level DIEs may've been constructed during the delay, causing the referenced type to be created and added after those intervening DIEs. In the extreme case, in cross-cu-inlining.ll, this actually causes the DW_TAG_basic_type for "int" to move from one CU to another. llvm-svn: 209674
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 1b0b1ebafd8..4a4d01246c2 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -389,6 +389,8 @@ class DwarfDebug : public AsmPrinterHandler {
/// \brief Collect info for variables that were optimized out.
void collectDeadVariables();
+ void finishSubprogramDefinitions();
+
/// \brief Finish off debug information after all functions have been
/// processed.
void finalizeModuleInfo();
OpenPOWER on IntegriCloud