Home | History | Annotate | Download | only in AsmPrinter

Lines Matching refs:DIE

35 CompileUnit::CompileUnit(unsigned I, unsigned L, DIE *D, AsmPrinter *A,
49 DIEEntry *CompileUnit::createDIEEntry(DIE *Entry) {
56 void CompileUnit::addUInt(DIE *Die, unsigned Attribute,
61 Die->addValue(Attribute, Form, Value);
66 void CompileUnit::addSInt(DIE *Die, unsigned Attribute,
70 Die->addValue(Attribute, Form, Value);
76 void CompileUnit::addString(DIE *Die, unsigned Attribute, StringRef String) {
85 Die->addValue(Attribute, dwarf::DW_FORM_strp, Value);
90 void CompileUnit::addLabel(DIE *Die, unsigned Attribute, unsigned Form,
93 Die->addValue(Attribute, Form, Value);
98 void CompileUnit::addDelta(DIE *Die, unsigned Attribute, unsigned Form,
101 Die->addValue(Attribute, Form, Value);
104 /// addDIEEntry - Add a DIE attribute data and value.
106 void CompileUnit::addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form,
107 DIE *Entry) {
108 Die->addValue(Attribute, Form, createDIEEntry(Entry));
113 void CompileUnit::addBlock(DIE *Die, unsigned Attribute, unsigned Form,
117 Die->addValue(Attribute, Block->BestForm(), Block);
122 void CompileUnit::addSourceLine(DIE *Die, DIVariable V) {
133 addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
134 addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
139 void CompileUnit::addSourceLine(DIE *Die, DIGlobalVariable G) {
149 addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
150 addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
155 void CompileUnit::addSourceLine(DIE *Die, DISubprogram SP) {
168 addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
169 addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
174 void CompileUnit::addSourceLine(DIE *Die, DIType Ty) {
185 addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
186 addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
191 void CompileUnit::addSourceLine(DIE *Die, DIObjCProperty Ty) {
203 addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
204 addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
209 void CompileUnit::addSourceLine(DIE *Die, DINameSpace NS) {
221 addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
222 addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
227 void CompileUnit::addVariableAddress(DbgVariable *&DV, DIE *Die,
230 addComplexAddress(DV, Die, dwarf::DW_AT_location, Location);
232 addBlockByrefAddress(DV, Die, dwarf::DW_AT_location, Location);
234 addAddress(Die, dwarf::DW_AT_location, Location);
238 void CompileUnit::addRegisterOp(DIE *TheDie, unsigned Reg) {
250 void CompileUnit::addRegisterOffset(DIE *TheDie, unsigned Reg,
267 /// addAddress - Add an address attribute to a die based on the location
269 void CompileUnit::addAddress(DIE *Die, unsigned Attribute,
278 // Now attach the location information to the DIE.
279 addBlock(Die, Attribute, 0, Block);
285 /// the starting location. Add the DWARF information to the die.
287 void CompileUnit::addComplexAddress(DbgVariable *&DV, DIE *Die,
315 // Now attach the location information to the DIE.
316 addBlock(Die, Attribute, 0, Block);
376 /// starting location. Add the DWARF information to the die. For
379 void CompileUnit::addBlockByrefAddress(DbgVariable *&DV, DIE *Die,
468 // Now attach the location information to the DIE.
469 addBlock(Die, Attribute, 0, Block);
485 /// addConstantValue - Add constant value entry in variable DIE.
486 bool CompileUnit::addConstantValue(DIE *Die, const MachineOperand &MO,
503 addBlock(Die, dwarf::DW_AT_const_value, 0, Block);
507 /// addConstantFPValue - Add constant value entry in variable DIE.
508 bool CompileUnit::addConstantFPValue(DIE *Die, const MachineOperand &MO) {
528 addBlock(Die, dwarf::DW_AT_const_value, 0, Block);
532 /// addConstantValue - Add constant value entry in variable DIE.
533 bool CompileUnit::addConstantValue(DIE *Die, const ConstantInt *CI,
547 addUInt(Die, dwarf::DW_AT_const_value, form, CI->getZExtValue());
549 addSInt(Die, dwarf::DW_AT_const_value, form, CI->getSExtValue());
572 addBlock(Die, dwarf::DW_AT_const_value, 0, Block);
577 void CompileUnit::addTemplateParams(DIE &Buffer, DIArray TParams) {
590 /// addToContextOwner - Add Die into the list of its context owner's children.
591 void CompileUnit::addToContextOwner(DIE *Die, DIDescriptor Context) {
593 DIE *ContextDIE = getOrCreateTypeDIE(DIType(Context));
594 ContextDIE->addChild(Die);
596 DIE *ContextDIE = getOrCreateNameSpace(DINameSpace(Context));
597 ContextDIE->addChild(Die);
599 DIE *ContextDIE = getOrCreateSubprogramDIE(DISubprogram(Context));
600 ContextDIE->addChild(Die);
601 } else if (DIE *ContextDIE = getDIE(Context))
602 ContextDIE->addChild(Die);
604 addDie(Die);
607 /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
609 DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
613 DIE *TyDIE = getDIE(Ty);
618 TyDIE = new DIE(dwarf::DW_TAG_base_type);
649 void CompileUnit::addType(DIE *Entity, DIType Ty,
663 DIE *Buffer = getOrCreateTypeDIE(Ty);
702 /// constructTypeDIE - Construct basic type die from DIBasicType.
703 void CompileUnit::constructTypeDIE(DIE &Buffer, DIBasicType BTy) {
724 /// constructTypeDIE - Construct derived type die from DIDerivedType.
725 void CompileUnit::constructTypeDIE(DIE &Buffer, DIDerivedType DTy) {
753 /// constructTypeDIE - Construct type DIE from DICompositeType.
754 void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
772 DIE *ElemDie = NULL;
792 DIE *Arg = new DIE(dwarf::DW_TAG_unspecified_parameters);
796 DIE *Arg = new DIE(dwarf::DW_TAG_formal_parameter);
824 DIE *ElemDie = NULL;
842 ElemDie = new DIE(dwarf::DW_TAG_variable);
851 ElemDie = new DIE(dwarf::DW_TAG_friend);
857 ElemDie = new DIE(Property.getTag());
954 /// getOrCreateTemplateTypeParameterDIE - Find existing DIE or create new DIE
956 DIE *
958 DIE *ParamDIE = getDIE(TP);
962 ParamDIE = new DIE(dwarf::DW_TAG_template_type_parameter);
968 /// getOrCreateTemplateValueParameterDIE - Find existing DIE or create new DIE
970 DIE *
972 DIE *ParamDIE = getDIE(TPV);
976 ParamDIE = new DIE(dwarf::DW_TAG_template_value_parameter);
985 /// getOrCreateNameSpace - Create a DIE for DINameSpace.
986 DIE *CompileUnit::getOrCreateNameSpace(DINameSpace NS) {
987 DIE *NDie = getDIE(NS);
990 NDie = new DIE(dwarf::DW_TAG_namespace);
1012 /// getOrCreateSubprogramDIE - Create new DIE using SP.
1013 DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) {
1014 DIE *SPDie = getDIE(SP);
1019 DIE *DeclDie = NULL;
1024 SPDie = new DIE(dwarf::DW_TAG_subprogram);
1026 // DW_TAG_inlined_subroutine may refer to this DIE.
1044 // If this DIE is going to refer declaration info using AT_specification
1100 DIE *Arg = new DIE(dwarf::DW_TAG_formal_parameter);
1152 /// createGlobalVariableDIE - create global variable DIE.
1162 DIE *VariableDIE = new DIE(GV.getTag());
1188 DIE *VariableSpecDIE = NULL;
1195 // Do not create specification DIE if context is either compile unit
1199 // Create specification DIE.
1200 VariableSpecDIE = new DIE(dwarf::DW_TAG_variable);
1230 DIE *AddrDIE = VariableSpecDIE ? VariableSpecDIE : VariableDIE;
1242 /// constructSubrangeDIE - Construct subrange DIE from DISubrange.
1243 void CompileUnit::constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy){
1244 DIE *DW_Subrange = new DIE(dwarf::DW_TAG_subrange_type);
1265 /// constructArrayTypeDIE - Construct array type DIE from DICompositeType.
1266 void CompileUnit::constructArrayTypeDIE(DIE &Buffer,
1277 DIE *IdxTy = getIndexTyDie();
1280 IdxTy = new DIE(dwarf::DW_TAG_base_type);
1296 /// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator.
1297 DIE *CompileUnit::constructEnumTypeDIE(DIEnumerator ETy) {
1298 DIE *Enumerator = new DIE(dwarf::DW_TAG_enumerator);
1309 for (DenseMap<DIE *, const MDNode *>::iterator CI = ContainingTypeMap.begin(),
1311 DIE *SPDie = CI->first;
1314 DIE *NDie = getDIE(N);
1320 /// constructVariableDIE - Construct a DIE for the given DbgVariable.
1321 DIE *CompileUnit::constructVariableDIE(DbgVariable *DV, bool isScopeAbstract) {
1330 DIE *VariableDie = new DIE(Tag);
1332 DIE *AbsDIE = AbsVar ? AbsVar->getDIE() : NULL;
1427 /// createMemberDIE - Create new member DIE.
1428 DIE *CompileUnit::createMemberDIE(DIDerivedType DT) {
1429 DIE *MemberDie = new DIE(DT.getTag());