[llvm-commits] CVS: llvm/include/llvm/CodeGen/DwarfWriter.h
Jim Laskey
jlaskey at apple.com
Mon Feb 27 09:27:25 PST 2006
Changes in directory llvm/include/llvm/CodeGen:
DwarfWriter.h updated: 1.26 -> 1.27
---
Log message:
Supporting multiple compile units.
---
Diffs of the changes: (+16 -27)
DwarfWriter.h | 43 ++++++++++++++++---------------------------
1 files changed, 16 insertions(+), 27 deletions(-)
Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.26 llvm/include/llvm/CodeGen/DwarfWriter.h:1.27
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.26 Mon Feb 27 06:43:29 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Mon Feb 27 11:27:12 2006
@@ -32,6 +32,7 @@
// Forward declarations.
class AsmPrinter;
+class CompileUnit;
class CompileUnitDesc;
class DebugInfoDesc;
class DIE;
@@ -43,7 +44,6 @@
class SubprogramDesc;
class Type;
class TypeDesc;
-
//===----------------------------------------------------------------------===//
// DWLabel - Labels are used to track locations in the assembler file.
@@ -92,23 +92,20 @@
/// 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 @@
/// 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 @@
///
void EmitDebugPubNames();
- /// EmitDebugPubTypes - Emit info into a debug pubtypes section.
- ///
- void EmitDebugPubTypes();
-
/// EmitDebugStr - Emit info into a debug str section.
///
void EmitDebugStr();
More information about the llvm-commits
mailing list