14 #ifndef CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
15 #define CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
28 class MachineLocation;
83 std::vector<DIEBlock *> DIEBlocks;
116 return AccelNamespace;
128 bool hasContent()
const {
return !CUDie->getChildren().empty(); }
251 bool Indirect =
false);
329 return sizeof(int16_t) +
361 void constructTemplateTypeParameterDIE(
DIE &Buffer,
366 void constructTemplateValueParameterDIE(
DIE &Buffer,
373 unsigned DebugInfoOffset;
377 int64_t getDefaultLowerBound()
const;
382 return MDNodeToDIEEntryMap.lookup(N);
386 void insertDIEEntry(
const MDNode *N, DIEEntry *E) {
387 MDNodeToDIEEntryMap.insert(std::make_pair(N, E));
391 DIE *getIndexTyDie() {
return IndexTyDie; }
395 void setIndexTyDie(DIE *D) { IndexTyDie = D; }
399 DIEEntry *createDIEEntry(DIE *Entry);
403 template <
typename T>
T resolve(DIRef<T> Ref)
const {
DITemplateTypeParameter - This is a wrapper for template type parameter.
DIE * getOrCreateSubprogramDIE(DISubprogram SP)
getOrCreateSubprogramDIE - Create new DIE using SP.
void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym)
Emit the header for this unit, not including the initial length field.
Collects and handles dwarf debug information.
unsigned getDebugInfoOffset() const
Collects and handles information specific to a particular collection of units.
DIE * getOrCreateNameSpace(DINameSpace NS)
getOrCreateNameSpace - Create a DIE for DINameSpace.
MDNode - a tuple of other values.
void addPubTypes(DISubprogram SP)
addPubTypes - Add a set of types from the subprogram to the global types.
DIE * constructVariableDIE(DbgVariable &DV, bool isScopeAbstract)
constructVariableDIE - Construct a DIE for the given DbgVariable.
uint16_t getLanguage() const
DIArray - This descriptor holds an array of descriptors.
void addAccelType(StringRef Name, std::pair< DIE *, unsigned > Die)
addAccelType - Add a new type to the type accelerator table.
void addLabel(DIE *Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Label)
DISubrange - This is used to represent ranges, for array bounds.
void addExpr(DIEBlock *Die, dwarf::Form Form, const MCExpr *Expr)
DISubprogram - This is a wrapper for a subprogram (e.g. a function).
void addAccelNamespace(StringRef Name, DIE *Die)
addAccelNamespace - Add a new name to the namespace accelerator table.
void createGlobalVariableDIE(DIGlobalVariable GV)
createGlobalVariableDIE - create global variable DIE.
This class is used to track local variable information.
void addTemplateParams(DIE &Buffer, DIArray TParams)
addTemplateParams - Add template parameters in buffer.
CompileUnit(unsigned UID, DIE *D, DICompileUnit CU, AsmPrinter *A, DwarfDebug *DW, DwarfUnits *DWU)
CompileUnit - Compile unit constructor.
DIE * getOrCreateTypeDIE(const MDNode *N)
void addUInt(DIE *Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, uint64_t Integer)
void addString(DIE *Die, dwarf::Attribute Attribute, const StringRef Str)
void addOpAddress(DIEBlock *Die, const MCSymbol *Label)
void addLocalString(DIE *Die, dwarf::Attribute Attribute, const StringRef Str)
DITemplateValueParameter - This is a wrapper for template value parameter.
DIE * getOrCreateContextDIE(DIScope Context)
getOrCreateContextDIE - Get context owner's DIE.
void addBlockByrefAddress(const DbgVariable &DV, DIE *Die, dwarf::Attribute Attribute, const MachineLocation &Location)
unsigned getUniqueID() const
void addBlock(DIE *Die, dwarf::Attribute Attribute, DIEBlock *Block)
void addDelta(DIE *Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Hi, const MCSymbol *Lo)
void addConstantFPValue(DIE *Die, const MachineOperand &MO)
addConstantFPValue - Add constant value entry in variable DIE.
DIGlobalVariable - This is a wrapper for a global variable.
unsigned getHeaderSize() const
void addAccelName(StringRef Name, DIE *Die)
addAccelName - Add a new name to the name accelerator table.
void addConstantValue(DIE *Die, const MachineOperand &MO, DIType Ty)
addConstantValue - Add constant value entry in variable DIE.
DIE * getDIE(DIDescriptor D) const
std::string getParentContextString(DIScope Context) const
const StringMap< DIE * > & getGlobalNames() const
DIScope - A base class for various scopes.
void constructContainingTypeDIEs()
const StringMap< DIE * > & getGlobalTypes() const
void addSourceLine(DIE *Die, DIVariable V)
void insertDIE(DIDescriptor Desc, DIE *D)
void addAddress(DIE *Die, dwarf::Attribute Attribute, const MachineLocation &Location, bool Indirect=false)
DIE * createAndAddDIE(unsigned Tag, DIE &Parent, DIDescriptor N=DIDescriptor())
Class for constant integers.
DINameSpace - A wrapper for a C++ style name space.
const StringMap< std::vector< std::pair< DIE *, unsigned > > > & getAccelTypes() const
T resolve(DIRef< T > Ref) const
Find the MDNode for the given reference.
void addGlobalName(StringRef Name, DIE *Die, DIScope Context)
addGlobalName - Add a new global name to the compile unit.
void addVariableAddress(const DbgVariable &DV, DIE *Die, MachineLocation Location)
Class for arbitrary precision integers.
~CompileUnit()
~CompileUnit - Destructor for compile unit.
void setDebugInfoOffset(unsigned DbgInfoOff)
DICompileUnit getNode() const
void addRegisterOp(DIEBlock *TheDie, unsigned Reg)
addRegisterOp - Add register operand.
const StringMap< std::vector< DIE * > > & getAccelNames() const
void addGlobalType(DIType Ty)
void addComplexAddress(const DbgVariable &DV, DIE *Die, dwarf::Attribute Attribute, const MachineLocation &Location)
void addSInt(DIE *Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, int64_t Integer)
void addFlag(DIE *Die, dwarf::Attribute Attribute)
addFlag - Add a flag that is true to the DIE.
const StringMap< std::vector< DIE * > > & getAccelNamespace() const
void addType(DIE *Entity, DIType Ty, dwarf::Attribute Attribute=dwarf::DW_AT_type)
addType - Add a new type attribute to the specified entity.
const StringMap< std::vector< DIE * > > & getAccelObjC() const
void addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIE *Entry)
void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label)
DIEBlock - A block of values. Primarily used for location expressions.
DICompileUnit - A wrapper for a compile unit.
void addRegisterOffset(DIEBlock *TheDie, unsigned Reg, int64_t Offset)
addRegisterOffset - Add register offset.
void addAccelObjC(StringRef Name, DIE *Die)
addAccelObjC - Add a new name to the ObjC accelerator table.
unsigned getLanguage() const
DIBasicType - A basic type, like 'int' or 'float'.