diff options
author | Devang Patel <dpatel@apple.com> | 2010-05-10 22:49:55 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-05-10 22:49:55 +0000 |
commit | 163a9f7c5f545414506364a94689e22d59533fe6 (patch) | |
tree | a933b49411b1ecbb61e99a2678579ae3b28571d3 /lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | 071f73db4a0c3f7f00ef14d38af17f3c8d69827a (diff) | |
download | external_llvm-163a9f7c5f545414506364a94689e22d59533fe6.zip external_llvm-163a9f7c5f545414506364a94689e22d59533fe6.tar.gz external_llvm-163a9f7c5f545414506364a94689e22d59533fe6.tar.bz2 |
Enable multiple Compile Units in one module.
This means now 'llvm-ld a.bc b.bc' will preserve debug info appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index f3d6407..56282a3 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -82,8 +82,8 @@ class DwarfDebug { // Attributes used to construct specific Dwarf sections. // - /// ModuleCU - All DIEs are inserted in ModuleCU. - CompileUnit *ModuleCU; + CompileUnit *FirstCU; + DenseMap <const MDNode *, CompileUnit *> CUMap; /// AbbreviationsSet - Used to uniquely define abbreviations. /// @@ -506,10 +506,17 @@ private: /// maps as well. unsigned GetOrCreateSourceID(StringRef DirName, StringRef FileName); + /// 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; + + /// constructGlobalVariableDIE - Construct global variable DIE. void constructGlobalVariableDIE(const MDNode *N); + /// construct SubprogramDIE - Construct subprogram DIE. void constructSubprogramDIE(const MDNode *N); // FIXME: This should go away in favor of complex addresses. |