//
class AsmPrinter;
class CompileUnitDesc;
+ class DebugInfoDesc;
class DIE;
- class DwarfWriter;
- class DWContext;
+ class DwarfWriter;
+ class GlobalVariableDesc;
class MachineDebugInfo;
class MachineFunction;
class Module;
+ class SubprogramDesc;
class Type;
//===--------------------------------------------------------------------===//
unsigned getTag() const { return Tag; }
unsigned getChildrenFlag() const { return ChildrenFlag; }
const std::vector<DIEAbbrevData> &getData() const { return Data; }
+ void setChildrenFlag(unsigned CF) { ChildrenFlag = CF; }
/// operator== - Used by UniqueVector to locate entry.
///
unsigned AbbrevID; // Decribing abbreviation ID.
unsigned Offset; // Offset in debug info section.
unsigned Size; // Size of instance + children.
- DWContext *Context; // Context for types and values.
std::vector<DIE *> Children; // Children DIEs.
std::vector<DIEValue *> Values; // Attributes values.
public:
- DIE(unsigned Tag, unsigned ChildrenFlag);
+ DIE(unsigned Tag);
~DIE();
// Accessors
unsigned getAbbrevID() const { return AbbrevID; }
unsigned getOffset() const { return Offset; }
unsigned getSize() const { return Size; }
- DWContext *getContext() const { return Context; }
const std::vector<DIE *> &getChildren() const { return Children; }
const std::vector<DIEValue *> &getValues() const { return Values; }
void setOffset(unsigned O) { Offset = O; }
void setSize(unsigned S) { Size = S; }
- void setContext(DWContext *C) { Context = C; }
/// SiblingOffset - Return the offset of the debug information entry's
/// sibling.
void AddChild(DIE *Child);
};
- //===--------------------------------------------------------------------===//
- /// DWContext - Name context for types and values.
- ///
- class DWContext {
- private:
- DwarfWriter &DW; // DwarfWriter for global information.
- DWContext *Parent; // Next context level searched.
- DIE *Owner; // Owning debug information entry.
- std::map<const Type *, DIE*> Types; // Named types in context.
- std::map<std::string, DIE*> Variables;// Named variables in context.
-
- public:
- DWContext(DwarfWriter &D, DWContext *P, DIE *O)
- : DW(D)
- , Parent(P)
- , Owner(O)
- , Types()
- , Variables()
- {
- Owner->setContext(this);
- }
- ~DWContext() {}
-
- /// NewBasicType - Creates a new basic type, if necessary, then adds to the
- /// context and owner.
- DIE *NewBasicType(const Type *Ty, unsigned Size, unsigned Align);
-
- /// NewVariable - Creates a basic variable, if necessary, then adds to the
- /// context and owner.
- DIE *NewGlobalVariable(const std::string &Name,
- const std::string &MangledName,
- DIE *Type);
- };
-
//===--------------------------------------------------------------------===//
// DwarfWriter - Emits Dwarf debug and exception handling directives.
//
///
UniqueVector<std::string> StringPool;
+ /// DescToDieMap - Tracks the mapping of debug informaton descriptors to
+ /// DIES.
+ std::map<DebugInfoDesc *, DIE *> DescToDieMap;
+
+ /// TypeToDieMap - Type to DIEType map.
+ ///
+ // FIXME - Should not be needed.
+ std::map<Type *, DIE *> TypeToDieMap;
+
//===------------------------------------------------------------------===//
// Properties to be set by the derived class ctor, used to configure the
// Dwarf writer.
///
DWLabel NewString(const std::string &String);
+ /// 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);
+
+private:
- /// NewGlobalVariable - Add a new global variable DIE to the context.
+ /// NewGlobalVariable - Make a new global variable DIE.
///
- void NewGlobalVariable(DWContext *Context,
- const std::string &Name,
- const std::string &MangledName,
- const Type *Ty,
- unsigned Size, unsigned Align);
+ DIE *NewGlobalVariable(GlobalVariableDesc *GVD);
-private:
+ /// NewSubprogram - Add a new subprogram DIE.
+ ///
+ DIE *NewSubprogram(SubprogramDesc *SPD);
/// NewCompileUnit - Create new compile unit information.
///
- DIE *NewCompileUnit(const CompileUnitDesc *CompileUnit);
+ DIE *NewCompileUnit(CompileUnitDesc *CompileUnit);
/// EmitInitial - Emit initial Dwarf declarations.
///
/// SizeAndOffsetDie - Compute the size and offset of a DIE.
///
- unsigned SizeAndOffsetDie(DIE *Die, unsigned Offset) const;
+ unsigned SizeAndOffsetDie(DIE *Die, unsigned Offset);
/// SizeAndOffsets - Compute the size and offset of all the DIEs.
///
/// header file.
void ConstructCompileUnitDIEs();
- /// ConstructGlobalDIEs - Create DIEs for each of the externally visible global
- /// variables.
+ /// ConstructGlobalDIEs - Create DIEs for each of the externally visible
+ /// global variables.
void ConstructGlobalDIEs(Module &M);
+ /// ConstructSubprogramDIEs - Create DIEs for each of the externally visible
+ /// subprograms.
+ void ConstructSubprogramDIEs(Module &M);
+
/// ShouldEmitDwarf - Returns true if Dwarf declarations should be made.
/// When called it also checks to see if debug info is newly available. if
/// so the initial Dwarf headers are emitted.
//===----------------------------------------------------------------------===//
-DIE::DIE(unsigned Tag, unsigned ChildrenFlag)
-: Abbrev(new DIEAbbrev(Tag, ChildrenFlag))
+DIE::DIE(unsigned Tag)
+: Abbrev(new DIEAbbrev(Tag, DW_CHILDREN_no))
, AbbrevID(0)
, Offset(0)
, Size(0)
-, Context(NULL)
, Children()
, Values()
{}
for (unsigned j = 0, M = Values.size(); j < M; ++j) {
delete Values[j];
}
-
- if (Context) delete Context;
}
/// AddUInt - Add an unsigned integer attribute data and value.
/// AddChild - Add a child to the DIE.
///
void DIE::AddChild(DIE *Child) {
+ assert(Abbrev && "Adding children without an abbreviation");
+ Abbrev->setChildrenFlag(DW_CHILDREN_yes);
Children.push_back(Child);
}
//===----------------------------------------------------------------------===//
-/// NewBasicType - Creates a new basic type if necessary, then adds to the
-/// context and owner.
-DIE *DWContext::NewBasicType(const Type *Ty, unsigned Size, unsigned Align) {
- DIE *TypeDie = Types[Ty];
-
- // If first occurance of type.
- if (!TypeDie) {
- const char *Name;
- unsigned Encoding = 0;
-
- switch (Ty->getTypeID()) {
- case Type::UByteTyID:
- Name = "unsigned char";
- Encoding = DW_ATE_unsigned_char;
- break;
- case Type::SByteTyID:
- Name = "char";
- Encoding = DW_ATE_signed_char;
- break;
- case Type::UShortTyID:
- Name = "unsigned short";
- Encoding = DW_ATE_unsigned;
- break;
- case Type::ShortTyID:
- Name = "short";
- Encoding = DW_ATE_signed;
- break;
- case Type::UIntTyID:
- Name = "unsigned int";
- Encoding = DW_ATE_unsigned;
- break;
- case Type::IntTyID:
- Name = "int";
- Encoding = DW_ATE_signed;
- break;
- case Type::ULongTyID:
- Name = "unsigned long long";
- Encoding = DW_ATE_unsigned;
- break;
- case Type::LongTyID:
- Name = "long long";
- Encoding = DW_ATE_signed;
- break;
- case Type::FloatTyID:
- Name = "float";
- Encoding = DW_ATE_float;
- break;
- case Type::DoubleTyID:
- Name = "float";
- Encoding = DW_ATE_float;
- break;
- default:
- // FIXME - handle more complex types.
- Name = "unknown";
- Encoding = DW_ATE_address;
- break;
- }
-
- // construct the type DIE.
- TypeDie = new DIE(DW_TAG_base_type, DW_CHILDREN_no);
- TypeDie->AddString(DW_AT_name, DW_FORM_string, Name);
- TypeDie->AddUInt (DW_AT_byte_size, 0, Size);
- TypeDie->AddUInt (DW_AT_encoding, DW_FORM_data1, Encoding);
- TypeDie->Complete(DW);
-
- // Add to context owner.
- Owner->AddChild(TypeDie);
-
- // Add to map.
- Types[Ty] = TypeDie;
- }
-
- return TypeDie;
-}
-
-/// NewGlobalVariable - Creates a global variable, if necessary, then adds in
-/// the context and owner.
-DIE *DWContext::NewGlobalVariable(const std::string &Name,
- const std::string &MangledName,
- DIE *Type) {
- DIE *VariableDie = Variables[MangledName];
-
- // If first occurance of variable.
- if (!VariableDie) {
- // FIXME - need source file name line number.
- VariableDie = new DIE(DW_TAG_variable, DW_CHILDREN_no);
- VariableDie->AddString (DW_AT_name, DW_FORM_string, Name);
- VariableDie->AddUInt (DW_AT_decl_file, 0, 0);
- VariableDie->AddUInt (DW_AT_decl_line, 0, 0);
- VariableDie->AddDIEntry (DW_AT_type, DW_FORM_ref4, Type);
- VariableDie->AddUInt (DW_AT_external, DW_FORM_flag, 1);
- // FIXME - needs to be a proper expression.
- VariableDie->AddObjectLabel(DW_AT_location, DW_FORM_block1, MangledName);
- VariableDie->Complete(DW);
-
- // Add to context owner.
- Owner->AddChild(VariableDie);
-
- // Add to map.
- Variables[MangledName] = VariableDie;
- }
-
- return VariableDie;
-}
+/// DWContext
//===----------------------------------------------------------------------===//
///
void DwarfWriter::EmitInt8(int Value) const {
O << Asm->Data8bitsDirective;
- PrintHex(Value);
+ PrintHex(Value & 0xFF);
}
/// EmitInt16 - Emit a short directive and value.
///
void DwarfWriter::EmitInt16(int Value) const {
O << Asm->Data16bitsDirective;
- PrintHex(Value);
+ PrintHex(Value & 0xFFFF);
}
/// EmitInt32 - Emit a long directive and value.
void DwarfWriter::PrintLabelName(const char *Tag, unsigned Number) const {
O << Asm->PrivateGlobalPrefix
<< "debug_"
- << Tag
- << Number;
+ << Tag;
+ if (Number) O << Number;
}
/// EmitLabel - Emit location label for internal use by Dwarf.
return DWLabel("string", StringID);
}
+/// NewBasicType - Creates a new basic type if necessary, then adds to the
+/// owner.
+/// FIXME - Should never be needed.
+DIE *DwarfWriter::NewBasicType(DIE *Owner, Type *Ty) {
+ DIE *&Slot = TypeToDieMap[Ty];
+ if (Slot) return Slot;
+
+ const char *Name;
+ unsigned Size;
+ unsigned Encoding = 0;
+
+ switch (Ty->getTypeID()) {
+ case Type::UByteTyID:
+ Name = "unsigned char";
+ Size = 1;
+ Encoding = DW_ATE_unsigned_char;
+ break;
+ case Type::SByteTyID:
+ Name = "char";
+ Size = 1;
+ Encoding = DW_ATE_signed_char;
+ break;
+ case Type::UShortTyID:
+ Name = "unsigned short";
+ Size = 2;
+ Encoding = DW_ATE_unsigned;
+ break;
+ case Type::ShortTyID:
+ Name = "short";
+ Size = 2;
+ Encoding = DW_ATE_signed;
+ break;
+ case Type::UIntTyID:
+ Name = "unsigned int";
+ Size = 4;
+ Encoding = DW_ATE_unsigned;
+ break;
+ case Type::IntTyID:
+ Name = "int";
+ Size = 4;
+ Encoding = DW_ATE_signed;
+ break;
+ case Type::ULongTyID:
+ Name = "unsigned long long";
+ Size = 7;
+ Encoding = DW_ATE_unsigned;
+ break;
+ case Type::LongTyID:
+ Name = "long long";
+ Size = 7;
+ Encoding = DW_ATE_signed;
+ break;
+ case Type::FloatTyID:
+ Name = "float";
+ Size = 4;
+ Encoding = DW_ATE_float;
+ break;
+ case Type::DoubleTyID:
+ Name = "double";
+ Size = 8;
+ Encoding = DW_ATE_float;
+ break;
+ default:
+ // FIXME - handle more complex types.
+ Name = "unknown";
+ Size = 1;
+ Encoding = DW_ATE_address;
+ break;
+ }
+
+ // construct the type DIE.
+ Slot = new DIE(DW_TAG_base_type);
+ Slot->AddString(DW_AT_name, DW_FORM_string, Name);
+ Slot->AddUInt (DW_AT_byte_size, 0, Size);
+ Slot->AddUInt (DW_AT_encoding, DW_FORM_data1, Encoding);
+
+ // Add to context owner.
+ Owner->AddChild(Slot);
+
+ return Slot;
+}
+
/// NewGlobalType - Make the type visible globally using the given name.
///
void DwarfWriter::NewGlobalType(const std::string &Name, DIE *Type) {
GlobalEntities[Name] = Entity;
}
-/// NewGlobalVariable - Add a new global variable DIE to the context.
-///
-void DwarfWriter::NewGlobalVariable(DWContext *Context,
- const std::string &Name,
- const std::string &MangledName,
- const Type *Ty,
- unsigned Size, unsigned Align) {
- // Get the DIE type for the global.
- DIE *Type = Context->NewBasicType(Ty, Size, Align);
- DIE *Variable = Context->NewGlobalVariable(Name, MangledName, Type);
- NewGlobalEntity(Name, Variable);
-}
-
/// NewCompileUnit - Create new compile unit information.
///
-DIE *DwarfWriter::NewCompileUnit(const CompileUnitDesc *CompileUnit) {
- DIE *Unit = new DIE(DW_TAG_compile_unit, DW_CHILDREN_yes);
+DIE *DwarfWriter::NewCompileUnit(CompileUnitDesc *CompileUnit) {
+ // Check for pre-existence.
+ DIE *&Slot = DescToDieMap[CompileUnit];
+ if (Slot) return Slot;
+
+ DIE *Unit = new DIE(DW_TAG_compile_unit);
// FIXME - use the correct line set.
- Unit->AddLabel (DW_AT_stmt_list, DW_FORM_data4, DWLabel("line", 0));
+ Unit->AddLabel (DW_AT_stmt_list, DW_FORM_data4, DWLabel("section_line", 0));
Unit->AddLabel (DW_AT_high_pc, DW_FORM_addr, DWLabel("text_end", 0));
Unit->AddLabel (DW_AT_low_pc, DW_FORM_addr, DWLabel("text_begin", 0));
Unit->AddString(DW_AT_producer, DW_FORM_string, CompileUnit->getProducer());
Unit->AddUInt (DW_AT_language, DW_FORM_data1, CompileUnit->getLanguage());
Unit->AddString(DW_AT_name, DW_FORM_string, CompileUnit->getFileName());
Unit->AddString(DW_AT_comp_dir, DW_FORM_string, CompileUnit->getDirectory());
- Unit->Complete(*this);
+
+ Slot = Unit;
return Unit;
}
+/// NewGlobalVariable - Add a new global variable DIE.
+///
+DIE *DwarfWriter::NewGlobalVariable(GlobalVariableDesc *GVD) {
+ // Check for pre-existence.
+ DIE *&Slot = DescToDieMap[GVD];
+ if (Slot) return Slot;
+
+ // Get the compile unit context.
+ CompileUnitDesc *CompileUnit =
+ static_cast<CompileUnitDesc *>(GVD->getContext());
+ DIE *Unit = NewCompileUnit(CompileUnit);
+ // Get the global variable itself.
+ GlobalVariable *GV = GVD->getGlobalVariable();
+ // Generate the mangled name.
+ std::string MangledName = Asm->Mang->getValueName(GV);
+
+ // Gather the details (simplify add attribute code.)
+ const std::string &Name = GVD->getName();
+ unsigned FileID = DebugInfo->RecordSource(CompileUnit);
+ unsigned Line = GVD->getLine();
+
+ // FIXME - faking the type for the time being.
+ DIE *Type = NewBasicType(Unit, Type::IntTy);
+
+ DIE *VariableDie = new DIE(DW_TAG_variable);
+ VariableDie->AddString (DW_AT_name, DW_FORM_string, Name);
+ VariableDie->AddUInt (DW_AT_decl_file, 0, FileID);
+ VariableDie->AddUInt (DW_AT_decl_line, 0, Line);
+ VariableDie->AddDIEntry (DW_AT_type, DW_FORM_ref4, Type);
+ VariableDie->AddUInt (DW_AT_external, DW_FORM_flag, 1);
+ // FIXME - needs to be a proper expression.
+ VariableDie->AddObjectLabel(DW_AT_location, DW_FORM_block1, MangledName);
+
+ // Add to map.
+ Slot = VariableDie;
+
+ // Add to context owner.
+ Unit->AddChild(VariableDie);
+
+ // Expose as global.
+ NewGlobalEntity(Name, VariableDie);
+
+ return VariableDie;
+}
+
+/// NewSubprogram - Add a new subprogram DIE.
+///
+DIE *DwarfWriter::NewSubprogram(SubprogramDesc *SPD) {
+ // Check for pre-existence.
+ DIE *&Slot = DescToDieMap[SPD];
+ if (Slot) return Slot;
+
+ // Get the compile unit context.
+ CompileUnitDesc *CompileUnit =
+ static_cast<CompileUnitDesc *>(SPD->getContext());
+ DIE *Unit = NewCompileUnit(CompileUnit);
+
+ // Gather the details (simplify add attribute code.)
+ const std::string &Name = SPD->getName();
+ unsigned FileID = DebugInfo->RecordSource(CompileUnit);
+ // FIXME - faking the line for the time being.
+ unsigned Line = 1;
+
+ // FIXME - faking the type for the time being.
+ DIE *Type = NewBasicType(Unit, Type::IntTy);
+
+ DIE *SubprogramDie = new DIE(DW_TAG_variable);
+ SubprogramDie->AddString (DW_AT_name, DW_FORM_string, Name);
+ SubprogramDie->AddUInt (DW_AT_decl_file, 0, FileID);
+ SubprogramDie->AddUInt (DW_AT_decl_line, 0, Line);
+ SubprogramDie->AddDIEntry (DW_AT_type, DW_FORM_ref4, Type);
+ SubprogramDie->AddUInt (DW_AT_external, DW_FORM_flag, 1);
+
+ // Add to map.
+ Slot = SubprogramDie;
+
+ // Add to context owner.
+ Unit->AddChild(SubprogramDie);
+
+ // Expose as global.
+ NewGlobalEntity(Name, SubprogramDie);
+
+ return SubprogramDie;
+}
+
/// EmitInitial - Emit initial Dwarf declarations. This is necessary for cc
/// tools to recognize the object file contains Dwarf information.
///
void DwarfWriter::EmitInitial() const {
// Dwarf sections base addresses.
- Asm->SwitchSection(DwarfAbbrevSection, 0);
- EmitLabel("abbrev", 0);
+ Asm->SwitchSection(DwarfFrameSection, 0);
+ EmitLabel("section_frame", 0);
Asm->SwitchSection(DwarfInfoSection, 0);
+ EmitLabel("section_info", 0);
EmitLabel("info", 0);
+ Asm->SwitchSection(DwarfAbbrevSection, 0);
+ EmitLabel("section_abbrev", 0);
+ EmitLabel("abbrev", 0);
+ Asm->SwitchSection(DwarfARangesSection, 0);
+ EmitLabel("section_aranges", 0);
+ Asm->SwitchSection(DwarfMacInfoSection, 0);
+ EmitLabel("section_macinfo", 0);
Asm->SwitchSection(DwarfLineSection, 0);
+ EmitLabel("section_line", 0);
EmitLabel("line", 0);
-
- // Standard sections base addresses.
+ Asm->SwitchSection(DwarfLocSection, 0);
+ EmitLabel("section_loc", 0);
+ Asm->SwitchSection(DwarfPubNamesSection, 0);
+ EmitLabel("section_pubnames", 0);
+ Asm->SwitchSection(DwarfStrSection, 0);
+ EmitLabel("section_str", 0);
+ Asm->SwitchSection(DwarfRangesSection, 0);
+ EmitLabel("section_ranges", 0);
+
Asm->SwitchSection(TextSection, 0);
EmitLabel("text_begin", 0);
Asm->SwitchSection(DataSection, 0);
/// SizeAndOffsetDie - Compute the size and offset of a DIE.
///
-unsigned DwarfWriter::SizeAndOffsetDie(DIE *Die, unsigned Offset) const {
+unsigned DwarfWriter::SizeAndOffsetDie(DIE *Die, unsigned Offset) {
+ // Record the abbreviation.
+ Die->Complete(*this);
+
// Get the abbreviation for this DIE.
unsigned AbbrevID = Die->getAbbrevID();
const DIEAbbrev &Abbrev = Abbreviations[AbbrevID];
// Construct rows of the address, source, line, column matrix.
for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) {
SourceLineInfo *LineInfo = LineInfos[i];
+
+ if (DwarfVerbose) {
+ unsigned SourceID = LineInfo->getSourceID();
+ const SourceFileInfo &SourceFile = SourceFiles[SourceID];
+ unsigned DirectoryID = SourceFile.getDirectoryID();
+ O << "\t"
+ << Asm->CommentString << " "
+ << Directories[DirectoryID]
+ << SourceFile.getName() << ":"
+ << LineInfo->getLine() << "\n";
+ }
// Define the line address.
EmitInt8(0); EOL("Extended Op");
}
}
+ // Define last address.
+ EmitInt8(0); EOL("Extended Op");
+ EmitInt8(4 + 1); EOL("Op size");
+ EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address");
+ EmitReference("text_end", 0); EOL("Location label");
+
// Mark end of matrix.
EmitInt8(0); EOL("DW_LNE_end_sequence");
EmitULEB128Bytes(1); O << "\n";
for (unsigned i = 1, N = CUW.size(); i <= N; ++i) {
DIE *Unit = NewCompileUnit(CUW[i]);
- DWContext *Context = new DWContext(*this, NULL, Unit);
CompileUnits.push_back(Unit);
}
}
/// ConstructGlobalDIEs - Create DIEs for each of the externally visible global
/// variables.
void DwarfWriter::ConstructGlobalDIEs(Module &M) {
- const TargetData &TD = Asm->TM.getTargetData();
-
std::vector<GlobalVariableDesc *> GlobalVariables =
- DebugInfo->getGlobalVariables(M);
+ DebugInfo->getAnchoredDescriptors<GlobalVariableDesc>(M);
for (unsigned i = 0, N = GlobalVariables.size(); i < N; ++i) {
GlobalVariableDesc *GVD = GlobalVariables[i];
- GlobalVariable *GV = GVD->getGlobalVariable();
-
- if (!GV->hasInitializer()) continue; // External global require no code
-
- // FIXME - Use global info type information when available.
- std::string Name = Asm->Mang->getValueName(GV);
- Constant *C = GV->getInitializer();
- const Type *Ty = C->getType();
- unsigned Size = TD.getTypeSize(Ty);
- unsigned Align = TD.getTypeAlignmentShift(Ty);
-
- if (C->isNullValue() && /* FIXME: Verify correct */
- (GV->hasInternalLinkage() || GV->hasWeakLinkage() ||
- GV->hasLinkOnceLinkage())) {
- if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
- }
-
- /// FIXME - Get correct compile unit context.
- assert(CompileUnits.size() && "No compile units");
- DWContext *Context = CompileUnits[0]->getContext();
-
- /// Create new global.
- NewGlobalVariable(Context, GV->getName(), Name, Ty, Size, Align);
+ NewGlobalVariable(GVD);
}
}
+/// ConstructSubprogramDIEs - Create DIEs for each of the externally visible
+/// subprograms.
+void DwarfWriter::ConstructSubprogramDIEs(Module &M) {
+ std::vector<SubprogramDesc *> Subprograms =
+ DebugInfo->getAnchoredDescriptors<SubprogramDesc>(M);
+
+ for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) {
+ SubprogramDesc *SPD = Subprograms[i];
+ NewSubprogram(SPD);
+ }
+}
/// ShouldEmitDwarf - Determine if Dwarf declarations should be made.
///
, GlobalTypes()
, GlobalEntities()
, StringPool()
+, DescToDieMap()
+, TypeToDieMap()
, AddressSize(sizeof(int32_t))
, hasLEB128(false)
, hasDotLoc(false)
// Create DIEs for each of the externally visible global variables.
ConstructGlobalDIEs(M);
+ // Create DIEs for each of the externally visible subprograms.
+ ConstructSubprogramDIEs(M);
+
// Compute DIE offsets and sizes.
SizeAndOffsets();