diff options
author | Devang Patel <dpatel@apple.com> | 2011-08-16 22:09:43 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-08-16 22:09:43 +0000 |
commit | 94c7ddb6f52a5200983fed0ce74dc602a7737879 (patch) | |
tree | c518ecc9201ac8f1f15ed60fabaf069d2cc8b603 /lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | 054ddf799b5487b85f6bc1d856c4e2a4978da4f7 (diff) |
Until now all debug info MDNodes referred to a root MDNode, a compile unit. This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL.
MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 3c8c683bd0..042d693a9b 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -192,8 +192,13 @@ class DwarfDebug { // CompileUnit *FirstCU; + + /// Maps MDNode with its corresponding CompileUnit. DenseMap <const MDNode *, CompileUnit *> CUMap; + /// Maps subprogram MDNode with its corresponding CompileUnit. + DenseMap <const MDNode *, CompileUnit *> SPMap; + /// AbbreviationsSet - Used to uniquely define abbreviations. /// FoldingSet<DIEAbbrev> AbbreviationsSet; @@ -410,10 +415,7 @@ private: /// constructCompileUnit - Create new CompileUnit for the given /// metadata node with tag DW_TAG_compile_unit. - void constructCompileUnit(const MDNode *N); - - /// getCompielUnit - Get CompileUnit DIE. - CompileUnit *getCompileUnit(const MDNode *N) const; + CompileUnit *constructCompileUnit(const MDNode *N); /// constructGlobalVariableDIE - Construct global variable DIE. void constructGlobalVariableDIE(CompileUnit *TheCU, const MDNode *N); |