diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-02-27 17:27:12 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-02-27 17:27:12 +0000 |
commit | bd76184e67faf1ece54ff984739c29239e118c76 (patch) | |
tree | d87172fc82d8d8a5e1a925fec1b3e2385cfa963b /include/llvm/CodeGen/DwarfWriter.h | |
parent | 0d086af82b2b659688911a5e8c3eb27d58156063 (diff) | |
download | external_llvm-bd76184e67faf1ece54ff984739c29239e118c76.zip external_llvm-bd76184e67faf1ece54ff984739c29239e118c76.tar.gz external_llvm-bd76184e67faf1ece54ff984739c29239e118c76.tar.bz2 |
Supporting multiple compile units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/DwarfWriter.h')
-rw-r--r-- | include/llvm/CodeGen/DwarfWriter.h | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h index 1a1a290..d4da085 100644 --- a/include/llvm/CodeGen/DwarfWriter.h +++ b/include/llvm/CodeGen/DwarfWriter.h @@ -32,6 +32,7 @@ namespace llvm { // Forward declarations. class AsmPrinter; +class CompileUnit; class CompileUnitDesc; class DebugInfoDesc; class DIE; @@ -43,7 +44,6 @@ class Module; class SubprogramDesc; class Type; class TypeDesc; - //===----------------------------------------------------------------------===// // DWLabel - Labels are used to track locations in the assembler file. @@ -92,23 +92,20 @@ protected: /// CompileUnits - All the compile units involved in this build. The index /// of each entry in this vector corresponds to the sources in DebugInfo. - std::vector<DIE *> CompileUnits; + std::vector<CompileUnit *> CompileUnits; /// Abbreviations - A UniqueVector of TAG structure abbreviations. /// UniqueVector<DIEAbbrev> Abbreviations; - /// GlobalTypes - A map of globally visible named types. - /// - std::map<std::string, DIE *> GlobalTypes; - - /// GlobalEntities - A map of globally visible named entities. - /// - std::map<std::string, DIE *> GlobalEntities; - /// StringPool - A UniqueVector of strings used by indirect references. - /// + /// UnitMap - Map debug information descriptor to compile unit. + /// UniqueVector<std::string> StringPool; + + /// UnitMap - Map debug information descriptor to compile unit. + /// + std::map<DebugInfoDesc *, CompileUnit *> DescToUnitMap; /// DescToDieMap - Tracks the mapping of debug informaton descriptors to /// DIES. @@ -299,25 +296,21 @@ public: /// NewBasicType - Creates a new basic type if necessary, then adds to the /// owner. /// FIXME - Should never be needed. - DIE *NewBasicType(DIE *Owner, Type *Ty); - - /// NewGlobalType - Make the type visible globally using the given name. - /// - void NewGlobalType(const std::string &Name, DIE *Type); - - /// NewGlobalEntity - Make the entity visible globally using the given name. - /// - void NewGlobalEntity(const std::string &Name, DIE *Entity); + DIE *NewBasicType(CompileUnit *Unit, Type *Ty); private: /// NewType - Create a new type DIE. /// - DIE *NewType(DIE *Unit, TypeDesc *TyDesc); + DIE *DwarfWriter::NewType(CompileUnit *Unit, TypeDesc *TyDesc); - /// NewCompileUnit - Create new compile unit DIE. + /// NewCompileUnit - Create new compile unit and it's die. /// - DIE *NewCompileUnit(CompileUnitDesc *CompileUnit); + CompileUnit *NewCompileUnit(CompileUnitDesc *UnitDesc, unsigned ID); + + /// FindCompileUnit - Get the compile unit for the given descriptor. + /// + CompileUnit *FindCompileUnit(CompileUnitDesc *UnitDesc); /// NewGlobalVariable - Make a new global variable DIE. /// @@ -363,10 +356,6 @@ private: /// void EmitDebugPubNames(); - /// EmitDebugPubTypes - Emit info into a debug pubtypes section. - /// - void EmitDebugPubTypes(); - /// EmitDebugStr - Emit info into a debug str section. /// void EmitDebugStr(); |