forked from OSchip/llvm-project
Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block"
This reverts commits *ee691970a9
(D113741), *79d3132998
(D114705) due to lldb and dexter test failures.
This commit is contained in:
parent
729bf9b26b
commit
a961604819
|
@ -44,23 +44,9 @@ CHECK-NEXT: DW_AT_producer ("clang version 7.0.0 (trunk {{.*}})")
|
|||
CHECK-NEXT: DW_AT_language (DW_LANG_C99)
|
||||
CHECK-NEXT: DW_AT_name ("hi_foo.c")
|
||||
|
||||
CHECK: DW_TAG_subprogram
|
||||
CHECK-NEXT: DW_AT_low_pc
|
||||
CHECK-NEXT: DW_AT_high_pc
|
||||
CHECK-NEXT: DW_AT_frame_base
|
||||
CHECK-NEXT: DW_AT_name ("foo")
|
||||
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
|
||||
CHECK-NEXT: DW_AT_decl_line (3)
|
||||
|
||||
CHECK: DW_TAG_formal_parameter
|
||||
CHECK-NEXT: DW_AT_location (DW_OP_WASM_location 0x0 0x0, DW_OP_stack_value)
|
||||
CHECK-NEXT: DW_AT_name ("p")
|
||||
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
|
||||
CHECK-NEXT: DW_AT_decl_line (3)
|
||||
|
||||
CHECK: DW_TAG_variable
|
||||
CHECK-NEXT: DW_AT_name ("y")
|
||||
CHECK-NEXT: DW_AT_type (0x000000d4 "int[2]")
|
||||
CHECK-NEXT: DW_AT_type (0x000000ac "int[2]")
|
||||
CHECK-NEXT: DW_AT_external (true)
|
||||
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
|
||||
CHECK-NEXT: DW_AT_decl_line (1)
|
||||
|
@ -82,9 +68,23 @@ CHECK-NEXT: DW_AT_encoding (DW_ATE_unsigned)
|
|||
|
||||
CHECK: DW_TAG_variable
|
||||
CHECK-NEXT: DW_AT_name ("z")
|
||||
CHECK-NEXT: DW_AT_type (0x000000d4 "int[2]")
|
||||
CHECK-NEXT: DW_AT_type (0x000000ac "int[2]")
|
||||
CHECK-NEXT: DW_AT_external (true)
|
||||
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
|
||||
CHECK-NEXT: DW_AT_decl_line (8)
|
||||
CHECK-NEXT: DW_AT_location (DW_OP_addr 0xffffffff)
|
||||
|
||||
CHECK: DW_TAG_subprogram
|
||||
CHECK-NEXT: DW_AT_low_pc
|
||||
CHECK-NEXT: DW_AT_high_pc
|
||||
CHECK-NEXT: DW_AT_frame_base
|
||||
CHECK-NEXT: DW_AT_name ("foo")
|
||||
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
|
||||
CHECK-NEXT: DW_AT_decl_line (3)
|
||||
|
||||
CHECK: DW_TAG_formal_parameter
|
||||
CHECK-NEXT: DW_AT_location (DW_OP_WASM_location 0x0 0x0, DW_OP_stack_value)
|
||||
CHECK-NEXT: DW_AT_name ("p")
|
||||
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
|
||||
CHECK-NEXT: DW_AT_decl_line (3)
|
||||
|
||||
|
|
|
@ -551,18 +551,8 @@ void DwarfCompileUnit::constructScopeDIE(LexicalScope *Scope,
|
|||
// Emit lexical blocks.
|
||||
DIE *ScopeDIE = constructLexicalScopeDIE(Scope);
|
||||
assert(ScopeDIE && "Scope DIE should not be null.");
|
||||
|
||||
ParentScopeDIE.addChild(ScopeDIE);
|
||||
|
||||
// Track abstract and concrete lexical block scopes.
|
||||
if (Scope->isAbstractScope()) {
|
||||
assert(!getAbstractScopeDIEs().count(DS) &&
|
||||
"Abstract DIE for this scope exists!");
|
||||
getAbstractScopeDIEs()[DS] = ScopeDIE;
|
||||
} else if (!Scope->getInlinedAt()) {
|
||||
assert(!LocalScopeDIEs.count(DS) && "Concrete DIE for this scope exists!");
|
||||
LocalScopeDIEs[DS] = ScopeDIE;
|
||||
}
|
||||
|
||||
createAndAddScopeChildren(Scope, *ScopeDIE);
|
||||
}
|
||||
|
||||
|
@ -656,7 +646,7 @@ DIE *DwarfCompileUnit::constructInlinedScopeDIE(LexicalScope *Scope) {
|
|||
auto *InlinedSP = getDISubprogram(DS);
|
||||
// Find the subprogram's DwarfCompileUnit in the SPMap in case the subprogram
|
||||
// was inlined from another compile unit.
|
||||
DIE *OriginDIE = getAbstractScopeDIEs()[InlinedSP];
|
||||
DIE *OriginDIE = getAbstractSPDies()[InlinedSP];
|
||||
assert(OriginDIE && "Unable to find original DIE for an inlined subprogram.");
|
||||
|
||||
auto ScopeDIE = DIE::get(DIEValueAllocator, dwarf::DW_TAG_inlined_subroutine);
|
||||
|
@ -1011,12 +1001,6 @@ DIE &DwarfCompileUnit::constructSubprogramScopeDIE(const DISubprogram *Sub,
|
|||
if (Scope) {
|
||||
assert(!Scope->getInlinedAt());
|
||||
assert(!Scope->isAbstractScope());
|
||||
|
||||
// Remember the subrogram before creating child entities.
|
||||
assert(!LocalScopeDIEs.count(Sub) &&
|
||||
"Concrete DIE for the subprogram exists!");
|
||||
LocalScopeDIEs[Sub] = &ScopeDIE;
|
||||
|
||||
// Collect lexical scope children first.
|
||||
// ObjectPointer might be a local (non-argument) local variable if it's a
|
||||
// block's synthetic this pointer.
|
||||
|
@ -1052,18 +1036,27 @@ DIE *DwarfCompileUnit::createAndAddScopeChildren(LexicalScope *Scope,
|
|||
for (DbgVariable *DV : Locals)
|
||||
ScopeDIE.addChild(constructVariableDIE(*DV, *Scope, ObjectPointer));
|
||||
|
||||
// Emit imported entities (skipped in gmlt-like data).
|
||||
if (!includeMinimalInlineScopes()) {
|
||||
for (const auto *IE : ImportedEntities[Scope->getScopeNode()])
|
||||
ScopeDIE.addChild(constructImportedEntityDIE(cast<DIImportedEntity>(IE)));
|
||||
}
|
||||
|
||||
// Emit labels.
|
||||
for (DbgLabel *DL : DU->getScopeLabels().lookup(Scope))
|
||||
ScopeDIE.addChild(constructLabelDIE(*DL, *Scope));
|
||||
|
||||
// Emit inner lexical scopes.
|
||||
auto needToEmitLexicalScope = [this](LexicalScope *LS) -> bool {
|
||||
auto needToEmitLexicalScope = [this](LexicalScope *LS) {
|
||||
if (isa<DISubprogram>(LS->getScopeNode()))
|
||||
return true;
|
||||
auto Vars = DU->getScopeVariables().lookup(LS);
|
||||
if (!Vars.Args.empty() || !Vars.Locals.empty())
|
||||
return true;
|
||||
return LocalScopesWithLocalDecls.count(LS->getScopeNode());
|
||||
if (!includeMinimalInlineScopes() &&
|
||||
!ImportedEntities[LS->getScopeNode()].empty())
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
for (LexicalScope *LS : Scope->getChildren()) {
|
||||
// If the lexical block doesn't have non-scope children, skip
|
||||
|
@ -1079,10 +1072,11 @@ DIE *DwarfCompileUnit::createAndAddScopeChildren(LexicalScope *Scope,
|
|||
|
||||
void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
|
||||
LexicalScope *Scope) {
|
||||
DIE *&AbsDef = getAbstractSPDies()[Scope->getScopeNode()];
|
||||
if (AbsDef)
|
||||
return;
|
||||
|
||||
auto *SP = cast<DISubprogram>(Scope->getScopeNode());
|
||||
if (auto *SPDie = getAbstractScopeDIEs().lookup(SP))
|
||||
return;
|
||||
|
||||
DIE *ContextDIE;
|
||||
DwarfCompileUnit *ContextCU = this;
|
||||
|
@ -1106,19 +1100,14 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
|
|||
|
||||
// Passing null as the associated node because the abstract definition
|
||||
// shouldn't be found by lookup.
|
||||
DIE &AbsDef = ContextCU->createAndAddDIE(dwarf::DW_TAG_subprogram,
|
||||
*ContextDIE, nullptr);
|
||||
|
||||
// Store the DIE before creating children.
|
||||
getAbstractScopeDIEs()[SP] = &AbsDef;
|
||||
|
||||
ContextCU->applySubprogramAttributesToDefinition(SP, AbsDef);
|
||||
ContextCU->addSInt(AbsDef, dwarf::DW_AT_inline,
|
||||
AbsDef = &ContextCU->createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr);
|
||||
ContextCU->applySubprogramAttributesToDefinition(SP, *AbsDef);
|
||||
ContextCU->addSInt(*AbsDef, dwarf::DW_AT_inline,
|
||||
DD->getDwarfVersion() <= 4 ? Optional<dwarf::Form>()
|
||||
: dwarf::DW_FORM_implicit_const,
|
||||
dwarf::DW_INL_inlined);
|
||||
if (DIE *ObjectPointer = ContextCU->createAndAddScopeChildren(Scope, AbsDef))
|
||||
ContextCU->addDIEEntry(AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
|
||||
if (DIE *ObjectPointer = ContextCU->createAndAddScopeChildren(Scope, *AbsDef))
|
||||
ContextCU->addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
|
||||
}
|
||||
|
||||
bool DwarfCompileUnit::useGNUAnalogForDwarf5Feature() const {
|
||||
|
@ -1252,61 +1241,47 @@ void DwarfCompileUnit::constructCallSiteParmEntryDIEs(
|
|||
}
|
||||
}
|
||||
|
||||
DIE *DwarfCompileUnit::createImportedEntityDIE(const DIImportedEntity *IE) {
|
||||
DIE *IMDie = DIE::get(DIEValueAllocator, (dwarf::Tag)IE->getTag());
|
||||
insertDIE(IE, IMDie);
|
||||
|
||||
DIE *DwarfCompileUnit::constructImportedEntityDIE(
|
||||
const DIImportedEntity *Module) {
|
||||
DIE *IMDie = DIE::get(DIEValueAllocator, (dwarf::Tag)Module->getTag());
|
||||
insertDIE(Module, IMDie);
|
||||
DIE *EntityDie;
|
||||
auto *Entity = IE->getEntity();
|
||||
auto *Entity = Module->getEntity();
|
||||
if (auto *NS = dyn_cast<DINamespace>(Entity))
|
||||
EntityDie = getOrCreateNameSpace(NS);
|
||||
else if (auto *M = dyn_cast<DIModule>(Entity))
|
||||
EntityDie = getOrCreateModule(M);
|
||||
else if (auto *SP = dyn_cast<DISubprogram>(Entity)) {
|
||||
// If we have abstract subprogram created, refer it.
|
||||
if (auto *AbsSPDie = getAbstractScopeDIEs().lookup(SP))
|
||||
EntityDie = AbsSPDie;
|
||||
else
|
||||
EntityDie = getOrCreateSubprogramDIE(SP);
|
||||
} else if (auto *T = dyn_cast<DIType>(Entity))
|
||||
else if (auto *SP = dyn_cast<DISubprogram>(Entity))
|
||||
EntityDie = getOrCreateSubprogramDIE(SP);
|
||||
else if (auto *T = dyn_cast<DIType>(Entity))
|
||||
EntityDie = getOrCreateTypeDIE(T);
|
||||
else if (auto *GV = dyn_cast<DIGlobalVariable>(Entity))
|
||||
EntityDie = getOrCreateGlobalVariableDIE(GV, {});
|
||||
else
|
||||
EntityDie = getDIE(Entity);
|
||||
assert(EntityDie);
|
||||
|
||||
addSourceLine(*IMDie, IE->getLine(), IE->getFile());
|
||||
addSourceLine(*IMDie, Module->getLine(), Module->getFile());
|
||||
addDIEEntry(*IMDie, dwarf::DW_AT_import, *EntityDie);
|
||||
StringRef Name = IE->getName();
|
||||
StringRef Name = Module->getName();
|
||||
if (!Name.empty())
|
||||
addString(*IMDie, dwarf::DW_AT_name, Name);
|
||||
|
||||
// This is for imported module with renamed entities (such as variables and
|
||||
// subprograms).
|
||||
DINodeArray Elements = IE->getElements();
|
||||
DINodeArray Elements = Module->getElements();
|
||||
for (const auto *Element : Elements) {
|
||||
if (!Element)
|
||||
continue;
|
||||
IMDie->addChild(createImportedEntityDIE(cast<DIImportedEntity>(Element)));
|
||||
IMDie->addChild(
|
||||
constructImportedEntityDIE(cast<DIImportedEntity>(Element)));
|
||||
}
|
||||
|
||||
return IMDie;
|
||||
}
|
||||
|
||||
void DwarfCompileUnit::createAndAddImportedEntityDIE(
|
||||
const DIImportedEntity *IE) {
|
||||
DIE *ContextDIE = getOrCreateContextDIE(IE->getScope());
|
||||
assert(ContextDIE &&
|
||||
"Could not get or create scope for the imported entity!");
|
||||
if (!ContextDIE)
|
||||
return;
|
||||
|
||||
ContextDIE->addChild(createImportedEntityDIE(IE));
|
||||
}
|
||||
|
||||
void DwarfCompileUnit::finishSubprogramDefinition(const DISubprogram *SP) {
|
||||
DIE *D = getDIE(SP);
|
||||
if (DIE *AbsSPDIE = getAbstractScopeDIEs().lookup(SP)) {
|
||||
if (DIE *AbsSPDIE = getAbstractSPDies().lookup(SP)) {
|
||||
if (D)
|
||||
// If this subprogram has an abstract definition, reference that
|
||||
addDIEEntry(*D, dwarf::DW_AT_abstract_origin, *AbsSPDIE);
|
||||
|
@ -1596,38 +1571,3 @@ void DwarfCompileUnit::createBaseTypeDIEs() {
|
|||
Btr.Die = &Die;
|
||||
}
|
||||
}
|
||||
|
||||
static DIE *
|
||||
findLocalScopeDIE(const DILocalScope *LS,
|
||||
DenseMap<const DILocalScope *, DIE *> &ScopeDIEs) {
|
||||
DIE *ScopeDIE = ScopeDIEs.lookup(LS);
|
||||
if (isa<DISubprogram>(LS) && !ScopeDIE)
|
||||
return nullptr;
|
||||
if (!ScopeDIE)
|
||||
return findLocalScopeDIE(cast<DILocalScope>(LS->getScope()), ScopeDIEs);
|
||||
return ScopeDIE;
|
||||
}
|
||||
|
||||
DIE *DwarfCompileUnit::findLocalScopeDIE(const DIScope *S) {
|
||||
auto *LScope = dyn_cast_or_null<DILocalScope>(S);
|
||||
if (!LScope)
|
||||
return nullptr;
|
||||
|
||||
// Check if we have an abstract tree.
|
||||
if (getAbstractScopeDIEs().count(LScope->getSubprogram()))
|
||||
return ::findLocalScopeDIE(LScope, getAbstractScopeDIEs());
|
||||
|
||||
return ::findLocalScopeDIE(LScope, LocalScopeDIEs);
|
||||
}
|
||||
|
||||
DIE *DwarfCompileUnit::getOrCreateContextDIE(const DIScope *Context) {
|
||||
if (auto *LScope = dyn_cast_or_null<DILocalScope>(Context)) {
|
||||
if (DIE *ScopeDIE = findLocalScopeDIE(LScope))
|
||||
return ScopeDIE;
|
||||
|
||||
// If nothing was found, fall back to DISubprogram and let
|
||||
// DwarfUnit::getOrCreateContextDIE() create a new DIE for it.
|
||||
Context = LScope->getSubprogram();
|
||||
}
|
||||
return DwarfUnit::getOrCreateContextDIE(Context);
|
||||
}
|
||||
|
|
|
@ -62,6 +62,11 @@ class DwarfCompileUnit final : public DwarfUnit {
|
|||
/// The start of the unit macro info within macro section.
|
||||
MCSymbol *MacroLabelBegin;
|
||||
|
||||
using ImportedEntityList = SmallVector<const MDNode *, 8>;
|
||||
using ImportedEntityMap = DenseMap<const MDNode *, ImportedEntityList>;
|
||||
|
||||
ImportedEntityMap ImportedEntities;
|
||||
|
||||
/// GlobalNames - A map of globally visible named entities for this unit.
|
||||
StringMap<const DIE *> GlobalNames;
|
||||
|
||||
|
@ -75,14 +80,9 @@ class DwarfCompileUnit final : public DwarfUnit {
|
|||
// ranges/locs.
|
||||
const MCSymbol *BaseAddress = nullptr;
|
||||
|
||||
DenseMap<const DILocalScope *, DIE *> LocalScopeDIEs;
|
||||
DenseMap<const DILocalScope *, DIE *> AbstractLocalScopeDIEs;
|
||||
DenseMap<const MDNode *, DIE *> AbstractSPDies;
|
||||
DenseMap<const DINode *, std::unique_ptr<DbgEntity>> AbstractEntities;
|
||||
|
||||
/// LocalScopesWithLocalDecls - A list of non-empty local scopes
|
||||
/// (with declaraions of static locals, function-local types, or imports).
|
||||
SmallPtrSet<const DILocalScope *, 8> LocalScopesWithLocalDecls;
|
||||
|
||||
/// DWO ID for correlating skeleton and split units.
|
||||
uint64_t DWOId = 0;
|
||||
|
||||
|
@ -92,10 +92,10 @@ class DwarfCompileUnit final : public DwarfUnit {
|
|||
|
||||
bool isDwoUnit() const override;
|
||||
|
||||
DenseMap<const DILocalScope *, DIE *> &getAbstractScopeDIEs() {
|
||||
DenseMap<const MDNode *, DIE *> &getAbstractSPDies() {
|
||||
if (isDwoUnit() && !DD->shareAcrossDWOCUs())
|
||||
return AbstractLocalScopeDIEs;
|
||||
return DU->getAbstractScopeDIEs();
|
||||
return AbstractSPDies;
|
||||
return DU->getAbstractSPDies();
|
||||
}
|
||||
|
||||
DenseMap<const DINode *, std::unique_ptr<DbgEntity>> &getAbstractEntities() {
|
||||
|
@ -169,6 +169,17 @@ public:
|
|||
|
||||
unsigned getOrCreateSourceID(const DIFile *File) override;
|
||||
|
||||
void addImportedEntity(const DIImportedEntity* IE) {
|
||||
DIScope *Scope = IE->getScope();
|
||||
assert(Scope && "Invalid Scope encoding!");
|
||||
if (!isa<DILocalScope>(Scope))
|
||||
// No need to add imported enities that are not local declaration.
|
||||
return;
|
||||
|
||||
auto *LocalScope = cast<DILocalScope>(Scope)->getNonLexicalBlockFileScope();
|
||||
ImportedEntities[LocalScope].push_back(IE);
|
||||
}
|
||||
|
||||
/// addRange - Add an address range to the list of ranges for this unit.
|
||||
void addRange(RangeSpan Range);
|
||||
|
||||
|
@ -210,9 +221,6 @@ public:
|
|||
|
||||
void createBaseTypeDIEs();
|
||||
|
||||
DIE *findLocalScopeDIE(const DIScope *S);
|
||||
DIE *getOrCreateContextDIE(const DIScope *Ty) override;
|
||||
|
||||
/// Construct a DIE for this subprogram scope.
|
||||
DIE &constructSubprogramScopeDIE(const DISubprogram *Sub,
|
||||
LexicalScope *Scope);
|
||||
|
@ -251,9 +259,8 @@ public:
|
|||
void constructCallSiteParmEntryDIEs(DIE &CallSiteDIE,
|
||||
SmallVector<DbgCallSiteParam, 4> &Params);
|
||||
|
||||
/// Construct DIE for an imported entity.
|
||||
DIE *createImportedEntityDIE(const DIImportedEntity *IE);
|
||||
void createAndAddImportedEntityDIE(const DIImportedEntity *IE);
|
||||
/// Construct import_module DIE.
|
||||
DIE *constructImportedEntityDIE(const DIImportedEntity *Module);
|
||||
|
||||
void finishSubprogramDefinition(const DISubprogram *SP);
|
||||
void finishEntityDefinition(const DbgEntity *Entity);
|
||||
|
@ -350,10 +357,6 @@ public:
|
|||
bool hasDwarfPubSections() const;
|
||||
|
||||
void addBaseTypeRef(DIEValueList &Die, int64_t Idx);
|
||||
|
||||
void recordLocalScopeWithDecls(const DILocalScope *S) {
|
||||
LocalScopesWithLocalDecls.insert(S);
|
||||
}
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
|
|
@ -516,7 +516,7 @@ void DwarfDebug::addSubprogramNames(const DICompileUnit &CU,
|
|||
// well into the name table. Only do that if we are going to actually emit
|
||||
// that name.
|
||||
if (SP->getLinkageName() != "" && SP->getName() != SP->getLinkageName() &&
|
||||
(useAllLinkageNames() || InfoHolder.getAbstractScopeDIEs().lookup(SP)))
|
||||
(useAllLinkageNames() || InfoHolder.getAbstractSPDies().lookup(SP)))
|
||||
addAccelName(CU, SP->getLinkageName(), Die);
|
||||
|
||||
// If this is an Objective-C selector name add it to the ObjC accelerator
|
||||
|
@ -1067,45 +1067,6 @@ void DwarfDebug::finishUnitAttributes(const DICompileUnit *DIUnit,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Collect local scopes that contain any local declarations
|
||||
// (excluding local variables) to be sure they will be emitted
|
||||
// (see DwarfCompileUnit::createAndAddScopeChildren() for details).
|
||||
static void collectLocalScopesWithDeclsFromCU(const DICompileUnit *CUNode,
|
||||
DwarfCompileUnit &CU) {
|
||||
auto getLocalScope = [](const DIScope *S) -> const DILocalScope * {
|
||||
if (!S)
|
||||
return nullptr;
|
||||
if (isa<DICommonBlock>(S))
|
||||
S = S->getScope();
|
||||
if (const auto *LScope = dyn_cast_or_null<DILocalScope>(S))
|
||||
return LScope->getNonLexicalBlockFileScope();
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
for (auto *GVE : CUNode->getGlobalVariables())
|
||||
if (auto *LScope = getLocalScope(GVE->getVariable()->getScope()))
|
||||
CU.recordLocalScopeWithDecls(LScope);
|
||||
|
||||
for (auto *Ty : CUNode->getEnumTypes())
|
||||
if (auto *LScope = getLocalScope(Ty->getScope()))
|
||||
CU.recordLocalScopeWithDecls(LScope);
|
||||
|
||||
for (auto *Ty : CUNode->getRetainedTypes())
|
||||
if (DIType *RT = dyn_cast<DIType>(Ty))
|
||||
if (auto *LScope = getLocalScope(RT->getScope()))
|
||||
CU.recordLocalScopeWithDecls(LScope);
|
||||
|
||||
for (auto *IE : CUNode->getImportedEntities())
|
||||
if (auto *LScope = getLocalScope(IE->getScope()))
|
||||
CU.recordLocalScopeWithDecls(LScope);
|
||||
|
||||
// FIXME: We know nothing about local records and typedefs here.
|
||||
// since nothing but local variables (and members of local records)
|
||||
// references them. So that they will be emitted in a first available
|
||||
// parent scope DIE.
|
||||
}
|
||||
|
||||
// Create new DwarfCompileUnit for the given metadata node with tag
|
||||
// DW_TAG_compile_unit.
|
||||
DwarfCompileUnit &
|
||||
|
@ -1120,6 +1081,9 @@ DwarfDebug::getOrCreateDwarfCompileUnit(const DICompileUnit *DIUnit) {
|
|||
DwarfCompileUnit &NewCU = *OwnedUnit;
|
||||
InfoHolder.addUnit(std::move(OwnedUnit));
|
||||
|
||||
for (auto *IE : DIUnit->getImportedEntities())
|
||||
NewCU.addImportedEntity(IE);
|
||||
|
||||
// LTO with assembly output shares a single line table amongst multiple CUs.
|
||||
// To avoid the compilation directory being ambiguous, let the line table
|
||||
// explicitly describe the directory of all files, never relying on the
|
||||
|
@ -1139,14 +1103,44 @@ DwarfDebug::getOrCreateDwarfCompileUnit(const DICompileUnit *DIUnit) {
|
|||
|
||||
CUMap.insert({DIUnit, &NewCU});
|
||||
CUDieMap.insert({&NewCU.getUnitDie(), &NewCU});
|
||||
|
||||
// Record local scopes, that have some globals (static locals),
|
||||
// imports or types declared within.
|
||||
collectLocalScopesWithDeclsFromCU(DIUnit, NewCU);
|
||||
|
||||
return NewCU;
|
||||
}
|
||||
|
||||
void DwarfDebug::constructAndAddImportedEntityDIE(DwarfCompileUnit &TheCU,
|
||||
const DIImportedEntity *N) {
|
||||
if (isa<DILocalScope>(N->getScope()))
|
||||
return;
|
||||
if (DIE *D = TheCU.getOrCreateContextDIE(N->getScope()))
|
||||
D->addChild(TheCU.constructImportedEntityDIE(N));
|
||||
}
|
||||
|
||||
/// Sort and unique GVEs by comparing their fragment offset.
|
||||
static SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &
|
||||
sortGlobalExprs(SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &GVEs) {
|
||||
llvm::sort(
|
||||
GVEs, [](DwarfCompileUnit::GlobalExpr A, DwarfCompileUnit::GlobalExpr B) {
|
||||
// Sort order: first null exprs, then exprs without fragment
|
||||
// info, then sort by fragment offset in bits.
|
||||
// FIXME: Come up with a more comprehensive comparator so
|
||||
// the sorting isn't non-deterministic, and so the following
|
||||
// std::unique call works correctly.
|
||||
if (!A.Expr || !B.Expr)
|
||||
return !!B.Expr;
|
||||
auto FragmentA = A.Expr->getFragmentInfo();
|
||||
auto FragmentB = B.Expr->getFragmentInfo();
|
||||
if (!FragmentA || !FragmentB)
|
||||
return !!FragmentB;
|
||||
return FragmentA->OffsetInBits < FragmentB->OffsetInBits;
|
||||
});
|
||||
GVEs.erase(std::unique(GVEs.begin(), GVEs.end(),
|
||||
[](DwarfCompileUnit::GlobalExpr A,
|
||||
DwarfCompileUnit::GlobalExpr B) {
|
||||
return A.Expr == B.Expr;
|
||||
}),
|
||||
GVEs.end());
|
||||
return GVEs;
|
||||
}
|
||||
|
||||
// Emit all Dwarf sections that should come prior to the content. Create
|
||||
// global DIEs and emit initial debug info sections. This is invoked by
|
||||
// the target AsmPrinter.
|
||||
|
@ -1162,6 +1156,14 @@ void DwarfDebug::beginModule(Module *M) {
|
|||
assert(MMI->hasDebugInfo() &&
|
||||
"DebugInfoAvailabilty unexpectedly not initialized");
|
||||
SingleCU = NumDebugCUs == 1;
|
||||
DenseMap<DIGlobalVariable *, SmallVector<DwarfCompileUnit::GlobalExpr, 1>>
|
||||
GVMap;
|
||||
for (const GlobalVariable &Global : M->globals()) {
|
||||
SmallVector<DIGlobalVariableExpression *, 1> GVs;
|
||||
Global.getDebugInfo(GVs);
|
||||
for (auto *GVE : GVs)
|
||||
GVMap[GVE->getVariable()].push_back({&Global, GVE->getExpression()});
|
||||
}
|
||||
|
||||
// Create the symbol that designates the start of the unit's contribution
|
||||
// to the string offsets table. In a split DWARF scenario, only the skeleton
|
||||
|
@ -1187,6 +1189,58 @@ void DwarfDebug::beginModule(Module *M) {
|
|||
// address table (.debug_addr) header.
|
||||
AddrPool.setLabel(Asm->createTempSymbol("addr_table_base"));
|
||||
DebugLocs.setSym(Asm->createTempSymbol("loclists_table_base"));
|
||||
|
||||
for (DICompileUnit *CUNode : M->debug_compile_units()) {
|
||||
// FIXME: Move local imported entities into a list attached to the
|
||||
// subprogram, then this search won't be needed and a
|
||||
// getImportedEntities().empty() test should go below with the rest.
|
||||
bool HasNonLocalImportedEntities = llvm::any_of(
|
||||
CUNode->getImportedEntities(), [](const DIImportedEntity *IE) {
|
||||
return !isa<DILocalScope>(IE->getScope());
|
||||
});
|
||||
|
||||
if (!HasNonLocalImportedEntities && CUNode->getEnumTypes().empty() &&
|
||||
CUNode->getRetainedTypes().empty() &&
|
||||
CUNode->getGlobalVariables().empty() && CUNode->getMacros().empty())
|
||||
continue;
|
||||
|
||||
DwarfCompileUnit &CU = getOrCreateDwarfCompileUnit(CUNode);
|
||||
|
||||
// Global Variables.
|
||||
for (auto *GVE : CUNode->getGlobalVariables()) {
|
||||
// Don't bother adding DIGlobalVariableExpressions listed in the CU if we
|
||||
// already know about the variable and it isn't adding a constant
|
||||
// expression.
|
||||
auto &GVMapEntry = GVMap[GVE->getVariable()];
|
||||
auto *Expr = GVE->getExpression();
|
||||
if (!GVMapEntry.size() || (Expr && Expr->isConstant()))
|
||||
GVMapEntry.push_back({nullptr, Expr});
|
||||
}
|
||||
|
||||
DenseSet<DIGlobalVariable *> Processed;
|
||||
for (auto *GVE : CUNode->getGlobalVariables()) {
|
||||
DIGlobalVariable *GV = GVE->getVariable();
|
||||
if (Processed.insert(GV).second)
|
||||
CU.getOrCreateGlobalVariableDIE(GV, sortGlobalExprs(GVMap[GV]));
|
||||
}
|
||||
|
||||
for (auto *Ty : CUNode->getEnumTypes()) {
|
||||
// The enum types array by design contains pointers to
|
||||
// MDNodes rather than DIRefs. Unique them here.
|
||||
CU.getOrCreateTypeDIE(cast<DIType>(Ty));
|
||||
}
|
||||
for (auto *Ty : CUNode->getRetainedTypes()) {
|
||||
// The retained types array by design contains pointers to
|
||||
// MDNodes rather than DIRefs. Unique them here.
|
||||
if (DIType *RT = dyn_cast<DIType>(Ty))
|
||||
// There is no point in force-emitting a forward declaration.
|
||||
CU.getOrCreateTypeDIE(RT);
|
||||
}
|
||||
// Emit imported_modules last so that the relevant context is already
|
||||
// available.
|
||||
for (auto *IE : CUNode->getImportedEntities())
|
||||
constructAndAddImportedEntityDIE(CU, IE);
|
||||
}
|
||||
}
|
||||
|
||||
void DwarfDebug::finishEntityDefinitions() {
|
||||
|
@ -1351,33 +1405,6 @@ void DwarfDebug::finalizeModuleInfo() {
|
|||
SkeletonHolder.computeSizeAndOffsets();
|
||||
}
|
||||
|
||||
/// Sort and unique GVEs by comparing their fragment offset.
|
||||
static SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &
|
||||
sortGlobalExprs(SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &GVEs) {
|
||||
llvm::sort(
|
||||
GVEs, [](DwarfCompileUnit::GlobalExpr A, DwarfCompileUnit::GlobalExpr B) {
|
||||
// Sort order: first null exprs, then exprs without fragment
|
||||
// info, then sort by fragment offset in bits.
|
||||
// FIXME: Come up with a more comprehensive comparator so
|
||||
// the sorting isn't non-deterministic, and so the following
|
||||
// std::unique call works correctly.
|
||||
if (!A.Expr || !B.Expr)
|
||||
return !!B.Expr;
|
||||
auto FragmentA = A.Expr->getFragmentInfo();
|
||||
auto FragmentB = B.Expr->getFragmentInfo();
|
||||
if (!FragmentA || !FragmentB)
|
||||
return !!FragmentB;
|
||||
return FragmentA->OffsetInBits < FragmentB->OffsetInBits;
|
||||
});
|
||||
GVEs.erase(std::unique(GVEs.begin(), GVEs.end(),
|
||||
[](DwarfCompileUnit::GlobalExpr A,
|
||||
DwarfCompileUnit::GlobalExpr B) {
|
||||
return A.Expr == B.Expr;
|
||||
}),
|
||||
GVEs.end());
|
||||
return GVEs;
|
||||
}
|
||||
|
||||
// Emit all Dwarf sections that should come after the content.
|
||||
void DwarfDebug::endModule() {
|
||||
// Terminate the pending line table.
|
||||
|
@ -1387,69 +1414,9 @@ void DwarfDebug::endModule() {
|
|||
assert(CurFn == nullptr);
|
||||
assert(CurMI == nullptr);
|
||||
|
||||
// Collect global variables info.
|
||||
DenseMap<DIGlobalVariable *, SmallVector<DwarfCompileUnit::GlobalExpr, 1>>
|
||||
GVMap;
|
||||
for (const GlobalVariable &Global : MMI->getModule()->globals()) {
|
||||
SmallVector<DIGlobalVariableExpression *, 1> GVs;
|
||||
Global.getDebugInfo(GVs);
|
||||
for (auto *GVE : GVs)
|
||||
GVMap[GVE->getVariable()].push_back({&Global, GVE->getExpression()});
|
||||
}
|
||||
|
||||
for (DICompileUnit *CUNode : MMI->getModule()->debug_compile_units()) {
|
||||
auto *CU = CUMap.lookup(CUNode);
|
||||
|
||||
// If this CU hasn't been emitted yet, create it here unless it is empty.
|
||||
if (!CU) {
|
||||
// FIXME: Move local imported entities into a list attached to the
|
||||
// subprogram, then this search won't be needed and a
|
||||
// getImportedEntities().empty() test should go below with the rest.
|
||||
bool HasNonLocalImportedEntities = llvm::any_of(
|
||||
CUNode->getImportedEntities(), [](const DIImportedEntity *IE) {
|
||||
return !isa<DILocalScope>(IE->getScope());
|
||||
});
|
||||
|
||||
if (!HasNonLocalImportedEntities && CUNode->getEnumTypes().empty() &&
|
||||
CUNode->getRetainedTypes().empty() &&
|
||||
CUNode->getGlobalVariables().empty() && CUNode->getMacros().empty())
|
||||
continue;
|
||||
|
||||
CU = &getOrCreateDwarfCompileUnit(CUNode);
|
||||
}
|
||||
|
||||
// Global Variables.
|
||||
for (auto *GVE : CUNode->getGlobalVariables()) {
|
||||
// Don't bother adding DIGlobalVariableExpressions listed in the CU if we
|
||||
// already know about the variable and it isn't adding a constant
|
||||
// expression.
|
||||
auto &GVMapEntry = GVMap[GVE->getVariable()];
|
||||
auto *Expr = GVE->getExpression();
|
||||
if (!GVMapEntry.size() || (Expr && Expr->isConstant()))
|
||||
GVMapEntry.push_back({nullptr, Expr});
|
||||
}
|
||||
|
||||
DenseSet<DIGlobalVariable *> Processed;
|
||||
for (auto *GVE : CUNode->getGlobalVariables()) {
|
||||
DIGlobalVariable *GV = GVE->getVariable();
|
||||
if (Processed.insert(GV).second)
|
||||
CU->getOrCreateGlobalVariableDIE(GV, sortGlobalExprs(GVMap[GV]));
|
||||
}
|
||||
|
||||
for (auto *Ty : CUNode->getEnumTypes())
|
||||
CU->getOrCreateTypeDIE(cast<DIType>(Ty));
|
||||
|
||||
for (auto *Ty : CUNode->getRetainedTypes())
|
||||
if (DIType *RT = dyn_cast<DIType>(Ty))
|
||||
// There is no point in force-emitting a forward declaration.
|
||||
CU->getOrCreateTypeDIE(RT);
|
||||
|
||||
// Emit imported entities last so that the relevant context
|
||||
// is already available.
|
||||
for (auto *IE : CUNode->getImportedEntities())
|
||||
CU->createAndAddImportedEntityDIE(IE);
|
||||
|
||||
CU->createBaseTypeDIEs();
|
||||
for (const auto &P : CUMap) {
|
||||
auto &CU = *P.second;
|
||||
CU.createBaseTypeDIEs();
|
||||
}
|
||||
|
||||
// If we aren't actually generating debug info (check beginModule -
|
||||
|
|
|
@ -316,13 +316,11 @@ class DwarfDebug : public DebugHandlerBase {
|
|||
/// can refer to them in spite of insertions into this list.
|
||||
DebugLocStream DebugLocs;
|
||||
|
||||
using SubprogramSetVector =
|
||||
SetVector<const DISubprogram *, SmallVector<const DISubprogram *, 16>,
|
||||
SmallPtrSet<const DISubprogram *, 16>>;
|
||||
|
||||
/// This is a collection of subprogram MDNodes that are processed to
|
||||
/// create DIEs.
|
||||
SubprogramSetVector ProcessedSPNodes;
|
||||
SetVector<const DISubprogram *, SmallVector<const DISubprogram *, 16>,
|
||||
SmallPtrSet<const DISubprogram *, 16>>
|
||||
ProcessedSPNodes;
|
||||
|
||||
/// If nonnull, stores the current machine function we're processing.
|
||||
const MachineFunction *CurFn = nullptr;
|
||||
|
@ -600,6 +598,10 @@ private:
|
|||
void finishUnitAttributes(const DICompileUnit *DIUnit,
|
||||
DwarfCompileUnit &NewCU);
|
||||
|
||||
/// Construct imported_module or imported_declaration DIE.
|
||||
void constructAndAddImportedEntityDIE(DwarfCompileUnit &TheCU,
|
||||
const DIImportedEntity *N);
|
||||
|
||||
/// Register a source line with debug info. Returns the unique
|
||||
/// label that was emitted and which provides correspondence to the
|
||||
/// source line list.
|
||||
|
|
|
@ -26,7 +26,6 @@ class DbgEntity;
|
|||
class DbgVariable;
|
||||
class DbgLabel;
|
||||
class DINode;
|
||||
class DILocalScope;
|
||||
class DwarfCompileUnit;
|
||||
class DwarfUnit;
|
||||
class LexicalScope;
|
||||
|
@ -88,7 +87,7 @@ class DwarfFile {
|
|||
DenseMap<LexicalScope *, LabelList> ScopeLabels;
|
||||
|
||||
// Collection of abstract subprogram DIEs.
|
||||
DenseMap<const DILocalScope *, DIE *> AbstractLocalScopeDIEs;
|
||||
DenseMap<const MDNode *, DIE *> AbstractSPDies;
|
||||
DenseMap<const DINode *, std::unique_ptr<DbgEntity>> AbstractEntities;
|
||||
|
||||
/// Maps MDNodes for type system with the corresponding DIEs. These DIEs can
|
||||
|
@ -163,8 +162,8 @@ public:
|
|||
return ScopeLabels;
|
||||
}
|
||||
|
||||
DenseMap<const DILocalScope *, DIE *> &getAbstractScopeDIEs() {
|
||||
return AbstractLocalScopeDIEs;
|
||||
DenseMap<const MDNode *, DIE *> &getAbstractSPDies() {
|
||||
return AbstractSPDies;
|
||||
}
|
||||
|
||||
DenseMap<const DINode *, std::unique_ptr<DbgEntity>> &getAbstractEntities() {
|
||||
|
|
|
@ -1200,7 +1200,7 @@ bool DwarfUnit::applySubprogramDefinitionAttributes(const DISubprogram *SP,
|
|||
"decl has a linkage name and it is different");
|
||||
if (DeclLinkageName.empty() &&
|
||||
// Always emit it for abstract subprograms.
|
||||
(DD->useAllLinkageNames() || DU->getAbstractScopeDIEs().lookup(SP)))
|
||||
(DD->useAllLinkageNames() || DU->getAbstractSPDies().lookup(SP)))
|
||||
addLinkageName(SPDie, LinkageName);
|
||||
|
||||
if (!DeclDie)
|
||||
|
|
|
@ -247,7 +247,7 @@ public:
|
|||
DIE *getOrCreateTypeDIE(const MDNode *TyNode);
|
||||
|
||||
/// Get context owner's DIE.
|
||||
virtual DIE *getOrCreateContextDIE(const DIScope *Context);
|
||||
DIE *getOrCreateContextDIE(const DIScope *Context);
|
||||
|
||||
/// Construct DIEs for types that contain vtables.
|
||||
void constructContainingTypeDIEs();
|
||||
|
|
|
@ -10,12 +10,12 @@ target triple = "thumbv7-apple-darwin10"
|
|||
@x4 = internal global i8 1, align 1, !dbg !8
|
||||
@x5 = global i8 1, align 1, !dbg !10
|
||||
|
||||
; CHECK: DW_TAG_variable [6]
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name {{.*}} "x1"
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr [[ADDR:0x[0-9a-fA-F]+]])
|
||||
; CHECK: DW_TAG_variable [6]
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name {{.*}} "x2"
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
; RUN: llc -arm-global-merge -global-merge-group-by-use=false -filetype=obj < %s | llvm-dwarfdump -debug-info -v - | FileCheck %s
|
||||
|
||||
; CHECK: DW_TAG_variable [6]
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name {{.*}} "x1"
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr [[ADDR:0x[0-9a-fA-F]+]])
|
||||
; CHECK: DW_TAG_variable [6]
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name {{.*}} "x2"
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
|
|
|
@ -13,7 +13,22 @@
|
|||
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
||||
|
||||
; CHECK: {{.*}}DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name {{.*}}"GlobA"
|
||||
; CHECK-NEXT: DW_AT_type
|
||||
; CHECK-NEXT: DW_AT_external
|
||||
; CHECK-NEXT: DW_AT_decl_file
|
||||
; CHECK-NEXT: DW_AT_decl_line
|
||||
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
|
||||
@GlobA = common addrspace(1) global i32 0, align 4, !dbg !0
|
||||
|
||||
; CHECK: {{.*}}DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name {{.*}}"GlobB"
|
||||
; CHECK-NEXT: DW_AT_type
|
||||
; CHECK-NEXT: DW_AT_external
|
||||
; CHECK-NEXT: DW_AT_decl_file
|
||||
; CHECK-NEXT: DW_AT_decl_line
|
||||
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
|
||||
@GlobB = common addrspace(1) global i32 0, align 4, !dbg !6
|
||||
|
||||
; CHECK: {{.*}}DW_TAG_subprogram
|
||||
|
@ -63,28 +78,12 @@ entry:
|
|||
!llvm.ident = !{!12}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
|
||||
; CHECK: {{.*}}DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name {{.*}}"GlobA"
|
||||
; CHECK-NEXT: DW_AT_type
|
||||
; CHECK-NEXT: DW_AT_external
|
||||
; CHECK-NEXT: DW_AT_decl_file
|
||||
; CHECK-NEXT: DW_AT_decl_line
|
||||
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
|
||||
!1 = distinct !DIGlobalVariable(name: "GlobA", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 5.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
|
||||
!3 = !DIFile(filename: "variable-locations.cl", directory: "/some/random/directory")
|
||||
!4 = !{}
|
||||
!5 = !{!0, !6}
|
||||
!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
|
||||
|
||||
; CHECK: {{.*}}DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name {{.*}}"GlobB"
|
||||
; CHECK-NEXT: DW_AT_type
|
||||
; CHECK-NEXT: DW_AT_external
|
||||
; CHECK-NEXT: DW_AT_decl_file
|
||||
; CHECK-NEXT: DW_AT_decl_line
|
||||
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
|
||||
!7 = distinct !DIGlobalVariable(name: "GlobB", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true)
|
||||
!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!9 = !{i32 2, i32 0}
|
||||
|
|
|
@ -36,8 +36,9 @@ entry:
|
|||
; CHECK: .quad bla1
|
||||
; CHECK-NEXT: DW_TAG_variable
|
||||
;
|
||||
; CHECK: .quad bla2
|
||||
; CHECK: .quad bla2
|
||||
; CHECK-NEXT: DW_TAG_const_type
|
||||
; CHECK-NEXT: DW_TAG_subprogram
|
||||
|
||||
; Function Attrs: nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.value(metadata, metadata, metadata) #1
|
||||
|
|
|
@ -27,15 +27,13 @@
|
|||
; The DISubprogram should show up in compile unit a.
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name ("a.cpp")
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name ("func")
|
||||
; CHECK: DW_AT_name ("b.cpp")
|
||||
; CHECK-NOT: DW_TAG_subprogram
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name ("b.cpp")
|
||||
; CHECK-NOT: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("a.cpp")
|
||||
; CHECK: DW_AT_name ("func")
|
||||
|
||||
source_filename = "test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll"
|
||||
|
||||
|
|
|
@ -18,10 +18,6 @@
|
|||
; CHECK-NEXT: DW_AT_reference DW_FORM_flag_present
|
||||
; CHECK: DW_TAG_subroutine_type DW_CHILDREN_yes
|
||||
; CHECK-NEXT: DW_AT_rvalue_reference DW_FORM_flag_present
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK-NOT: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name {{.*}} "g")
|
||||
;
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK-NOT: DW_TAG_subprogram
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
; We should have all three linkage names in the .debug_info and .debug_names
|
||||
; ALL: .debug_info contents:
|
||||
; ALL: DW_AT_linkage_name ("_ZN1n1vE")
|
||||
; ALL: DW_AT_linkage_name ("_Z1fi")
|
||||
; ALL: DW_AT_linkage_name ("_Z1gi")
|
||||
; ALL: DW_AT_linkage_name ("_ZN1n1vE")
|
||||
; ALL: .debug_names contents:
|
||||
; ALL: String: {{.*}} "_Z1fi"
|
||||
; ALL: String: {{.*}} "_Z1gi"
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
; rdar://17628609
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
; CHECK: 0x[[ENUM:.*]]: DW_TAG_enumeration_type
|
||||
; CHECK-NEXT: DW_AT_name {{.*}}"EA"
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_MIPS_linkage_name {{.*}}"_Z4topA2EA"
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{.*}} => {0x[[ENUM:.*]]}
|
||||
; CHECK: 0x[[ENUM]]: DW_TAG_enumeration_type
|
||||
; CHECK-NEXT: DW_AT_name {{.*}}"EA"
|
||||
; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{.*}} => {0x[[ENUM]]}
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
; CHECK: DW_TAG_subprogram
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump - | FileCheck --implicit-check-not "{{DW_TAG|NULL}}" %s
|
||||
|
||||
; namespace ns {
|
||||
; inline __attribute__((always_inline))
|
||||
; void foo() { int a = 4; }
|
||||
; }
|
||||
;
|
||||
; void goo() {
|
||||
; using ns::foo;
|
||||
; foo();
|
||||
; }
|
||||
|
||||
; Ensure that imported declarations reference the correct subprograms even if
|
||||
; those subprograms are inlined.
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
; CHECK: DW_TAG_namespace
|
||||
; CHECK: DW_AT_name ("ns")
|
||||
; CHECK: [[FOO:0x.*]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("foo")
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_base_type
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("goo")
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: DW_AT_abstract_origin ([[FOO]]
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_imported_declaration
|
||||
; CHECK: DW_AT_import ([[FOO]])
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; Function Attrs: mustprogress noinline optnone uwtable
|
||||
define dso_local void @_Z3goov() !dbg !4 {
|
||||
entry:
|
||||
%a.i = alloca i32, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %a.i, metadata !16, metadata !DIExpression()), !dbg !18
|
||||
store i32 4, i32* %a.i, align 4, !dbg !18
|
||||
ret void, !dbg !20
|
||||
}
|
||||
|
||||
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
||||
|
||||
!llvm.dbg.cu = !{!0}
|
||||
!llvm.module.flags = !{!10, !11, !12, !13, !14}
|
||||
!llvm.ident = !{!15}
|
||||
|
||||
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, imports: !2, splitDebugInlining: false, nameTableKind: None)
|
||||
!1 = !DIFile(filename: "imported-inlined-declaration.cpp", directory: "")
|
||||
!2 = !{!3}
|
||||
!3 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !4, entity: !8, file: !1, line: 7)
|
||||
!4 = distinct !DISubprogram(name: "goo", linkageName: "_Z3goov", scope: !1, file: !1, line: 6, type: !5, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !7)
|
||||
!5 = !DISubroutineType(types: !6)
|
||||
!6 = !{null}
|
||||
!7 = !{}
|
||||
!8 = distinct !DISubprogram(name: "foo", linkageName: "_ZN2ns3fooEv", scope: !9, file: !1, line: 3, type: !5, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !7)
|
||||
!9 = !DINamespace(name: "ns", scope: null)
|
||||
!10 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!11 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!12 = !{i32 1, !"wchar_size", i32 4}
|
||||
!13 = !{i32 7, !"uwtable", i32 1}
|
||||
!14 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!15 = !{!"clang version 14.0.0"}
|
||||
!16 = !DILocalVariable(name: "a", scope: !8, file: !1, line: 3, type: !17)
|
||||
!17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!18 = !DILocation(line: 3, column: 18, scope: !8, inlinedAt: !19)
|
||||
!19 = distinct !DILocation(line: 8, column: 2, scope: !4)
|
||||
!20 = !DILocation(line: 9, column: 1, scope: !4)
|
|
@ -13,17 +13,21 @@
|
|||
; Ensure that top level imported declarations don't produce an extra degenerate
|
||||
; concrete subprogram definition.
|
||||
|
||||
; FIXME: imported entities should only be emitted to the abstract origin if one is present
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("f1")
|
||||
; CHECK: DW_TAG_imported_declaration
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_namespace
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("f2")
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_namespace
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_imported_declaration
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
|
|
|
@ -34,9 +34,6 @@
|
|||
; b.m_fn2();
|
||||
; }
|
||||
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK-NEXT: DW_AT_name ("B")
|
||||
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK-NEXT: DW_AT_name ("C")
|
||||
; CHECK: [[M_FN3_DECL:.*]]: DW_TAG_subprogram
|
||||
|
|
|
@ -1,125 +0,0 @@
|
|||
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck --implicit-check-not "{{DW_TAG|NULL}}" %s
|
||||
|
||||
; inline __attribute__((always_inline))
|
||||
; int removed() { struct A {int i;}; struct A a; return a.i++; }
|
||||
;
|
||||
; __attribute__((always_inline))
|
||||
; int not_removed() { struct B {int i;}; struct B b; return b.i++; }
|
||||
;
|
||||
; int foo() { return removed() + not_removed(); }}
|
||||
|
||||
; Ensure that function-local types have the correct subprogram parent even if
|
||||
; those subprograms are inlined.
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_abstract_origin ({{0x.*}} "not_removed")
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("removed")
|
||||
; CHECK: [[A:0x.*]]: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("A")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_type ([[A]] "A")
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_base_type
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("not_removed")
|
||||
; CHECK: [[B:0x.*]]: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("B")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_type ([[B]] "B")
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
%struct.B = type { i32 }
|
||||
%struct.A = type { i32 }
|
||||
|
||||
define dso_local i32 @not_removed() !dbg !12 {
|
||||
%1 = alloca %struct.B, align 4
|
||||
call void @llvm.dbg.declare(metadata %struct.B* %1, metadata !18, metadata !DIExpression()), !dbg !22
|
||||
%2 = getelementptr inbounds %struct.B, %struct.B* %1, i32 0, i32 0, !dbg !23
|
||||
%3 = load i32, i32* %2, align 4, !dbg !24
|
||||
%4 = add nsw i32 %3, 1, !dbg !24
|
||||
store i32 %4, i32* %2, align 4, !dbg !24
|
||||
ret i32 %3, !dbg !25
|
||||
}
|
||||
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
||||
|
||||
define dso_local i32 @foo() !dbg !26 {
|
||||
%1 = alloca %struct.A, align 4
|
||||
%2 = alloca %struct.B, align 4
|
||||
call void @llvm.dbg.declare(metadata %struct.A* %1, metadata !27, metadata !DIExpression()), !dbg !32
|
||||
%3 = getelementptr inbounds %struct.A, %struct.A* %1, i32 0, i32 0, !dbg !34
|
||||
%4 = load i32, i32* %3, align 4, !dbg !35
|
||||
%5 = add nsw i32 %4, 1, !dbg !35
|
||||
store i32 %5, i32* %3, align 4, !dbg !35
|
||||
call void @llvm.dbg.declare(metadata %struct.B* %2, metadata !18, metadata !DIExpression()), !dbg !36
|
||||
%6 = getelementptr inbounds %struct.B, %struct.B* %2, i32 0, i32 0, !dbg !38
|
||||
%7 = load i32, i32* %6, align 4, !dbg !39
|
||||
%8 = add nsw i32 %7, 1, !dbg !39
|
||||
store i32 %8, i32* %6, align 4, !dbg !39
|
||||
%9 = add nsw i32 %4, %7, !dbg !40
|
||||
ret i32 %9, !dbg !41
|
||||
}
|
||||
|
||||
!llvm.dbg.cu = !{!0}
|
||||
!llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8, !9, !10}
|
||||
!llvm.ident = !{!11}
|
||||
|
||||
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
|
||||
!1 = !DIFile(filename: "inlined-local-type.cpp", directory: "")
|
||||
!2 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!4 = !{i32 1, !"wchar_size", i32 4}
|
||||
!5 = !{i32 1, !"branch-target-enforcement", i32 0}
|
||||
!6 = !{i32 1, !"sign-return-address", i32 0}
|
||||
!7 = !{i32 1, !"sign-return-address-all", i32 0}
|
||||
!8 = !{i32 1, !"sign-return-address-with-bkey", i32 0}
|
||||
!9 = !{i32 7, !"uwtable", i32 1}
|
||||
!10 = !{i32 7, !"frame-pointer", i32 1}
|
||||
!11 = !{!"clang version 14.0.0"}
|
||||
!12 = distinct !DISubprogram(name: "not_removed", scope: !13, file: !13, line: 5, type: !14, scopeLine: 5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17)
|
||||
!13 = !DIFile(filename: "inlined-local-type.cpp", directory: "")
|
||||
!14 = !DISubroutineType(types: !15)
|
||||
!15 = !{!16}
|
||||
!16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!17 = !{}
|
||||
!18 = !DILocalVariable(name: "b", scope: !12, file: !13, line: 5, type: !19)
|
||||
!19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "B", scope: !12, file: !13, line: 5, size: 32, elements: !20)
|
||||
!20 = !{!21}
|
||||
!21 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !19, file: !13, line: 5, baseType: !16, size: 32)
|
||||
!22 = !DILocation(line: 5, column: 49, scope: !12)
|
||||
!23 = !DILocation(line: 5, column: 61, scope: !12)
|
||||
!24 = !DILocation(line: 5, column: 62, scope: !12)
|
||||
!25 = !DILocation(line: 5, column: 52, scope: !12)
|
||||
!26 = distinct !DISubprogram(name: "foo", scope: !13, file: !13, line: 7, type: !14, scopeLine: 7, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17)
|
||||
!27 = !DILocalVariable(name: "a", scope: !28, file: !13, line: 2, type: !29)
|
||||
!28 = distinct !DISubprogram(name: "removed", scope: !13, file: !13, line: 2, type: !14, scopeLine: 2, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17)
|
||||
!29 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", scope: !28, file: !13, line: 2, size: 32, elements: !30)
|
||||
!30 = !{!31}
|
||||
!31 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !29, file: !13, line: 2, baseType: !16, size: 32)
|
||||
!32 = !DILocation(line: 2, column: 45, scope: !28, inlinedAt: !33)
|
||||
!33 = distinct !DILocation(line: 7, column: 20, scope: !26)
|
||||
!34 = !DILocation(line: 2, column: 57, scope: !28, inlinedAt: !33)
|
||||
!35 = !DILocation(line: 2, column: 58, scope: !28, inlinedAt: !33)
|
||||
!36 = !DILocation(line: 5, column: 49, scope: !12, inlinedAt: !37)
|
||||
!37 = distinct !DILocation(line: 7, column: 32, scope: !26)
|
||||
!38 = !DILocation(line: 5, column: 61, scope: !12, inlinedAt: !37)
|
||||
!39 = !DILocation(line: 5, column: 62, scope: !12, inlinedAt: !37)
|
||||
!40 = !DILocation(line: 7, column: 30, scope: !26)
|
||||
!41 = !DILocation(line: 7, column: 13, scope: !26)
|
|
@ -1,92 +0,0 @@
|
|||
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck --implicit-check-not "{{DW_TAG|NULL}}" %s
|
||||
|
||||
; inline __attribute__((always_inline))
|
||||
; int removed() { static int A; return A++; }
|
||||
;
|
||||
; __attribute__((always_inline))
|
||||
; int not_removed() { static int B; return B++; }
|
||||
;
|
||||
; int foo() { return removed() + not_removed(); }
|
||||
|
||||
; Ensure that global variables belong to the correct subprograms even if those
|
||||
; subprograms are inlined.
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_abstract_origin {{.*}} "_Z11not_removedv"
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("removed")
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("A")
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_base_type
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("not_removed")
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("B")
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("foo")
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
@_ZZ11not_removedvE1A = internal global i32 0, align 4, !dbg !0
|
||||
@_ZZ7removedvE1A = linkonce_odr dso_local global i32 0, align 4, !dbg !10
|
||||
|
||||
define dso_local i32 @_Z11not_removedv() !dbg !2 {
|
||||
%1 = load i32, i32* @_ZZ11not_removedvE1A, align 4, !dbg !24
|
||||
%2 = add nsw i32 %1, 1, !dbg !24
|
||||
store i32 %2, i32* @_ZZ11not_removedvE1A, align 4, !dbg !24
|
||||
ret i32 %1, !dbg !25
|
||||
}
|
||||
|
||||
define dso_local i32 @_Z3foov() !dbg !26 {
|
||||
%1 = load i32, i32* @_ZZ7removedvE1A, align 4, !dbg !27
|
||||
%2 = add nsw i32 %1, 1, !dbg !27
|
||||
store i32 %2, i32* @_ZZ7removedvE1A, align 4, !dbg !27
|
||||
%3 = load i32, i32* @_ZZ11not_removedvE1A, align 4, !dbg !29
|
||||
%4 = add nsw i32 %3, 1, !dbg !29
|
||||
store i32 %4, i32* @_ZZ11not_removedvE1A, align 4, !dbg !29
|
||||
%5 = add nsw i32 %1, %3, !dbg !31
|
||||
ret i32 %5, !dbg !32
|
||||
}
|
||||
|
||||
!llvm.dbg.cu = !{!7}
|
||||
!llvm.module.flags = !{!14, !15, !16, !17, !18, !19, !20, !21, !22}
|
||||
!llvm.ident = !{!23}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "B", scope: !2, file: !3, line: 5, type: !6, isLocal: true, isDefinition: true)
|
||||
!2 = distinct !DISubprogram(name: "not_removed", linkageName: "_Z11not_removedv", scope: !3, file: !3, line: 5, type: !4, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !13)
|
||||
!3 = !DIFile(filename: "example.cpp", directory: "")
|
||||
!4 = !DISubroutineType(types: !5)
|
||||
!5 = !{!6}
|
||||
!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!7 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !8, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !9, splitDebugInlining: false, nameTableKind: None)
|
||||
!8 = !DIFile(filename: "example.cpp", directory: "")
|
||||
!9 = !{!0, !10}
|
||||
!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression())
|
||||
!11 = distinct !DIGlobalVariable(name: "A", scope: !12, file: !3, line: 2, type: !6, isLocal: false, isDefinition: true)
|
||||
!12 = distinct !DISubprogram(name: "removed", linkageName: "_Z7removedv", scope: !3, file: !3, line: 2, type: !4, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !13)
|
||||
!13 = !{}
|
||||
!14 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!15 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!16 = !{i32 1, !"wchar_size", i32 4}
|
||||
!17 = !{i32 1, !"branch-target-enforcement", i32 0}
|
||||
!18 = !{i32 1, !"sign-return-address", i32 0}
|
||||
!19 = !{i32 1, !"sign-return-address-all", i32 0}
|
||||
!20 = !{i32 1, !"sign-return-address-with-bkey", i32 0}
|
||||
!21 = !{i32 7, !"uwtable", i32 1}
|
||||
!22 = !{i32 7, !"frame-pointer", i32 1}
|
||||
!23 = !{!"clang version 14.0.0"}
|
||||
!24 = !DILocation(line: 5, column: 43, scope: !2)
|
||||
!25 = !DILocation(line: 5, column: 35, scope: !2)
|
||||
!26 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !3, file: !3, line: 7, type: !4, scopeLine: 7, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !13)
|
||||
!27 = !DILocation(line: 2, column: 39, scope: !12, inlinedAt: !28)
|
||||
!28 = distinct !DILocation(line: 7, column: 20, scope: !26)
|
||||
!29 = !DILocation(line: 5, column: 43, scope: !2, inlinedAt: !30)
|
||||
!30 = distinct !DILocation(line: 7, column: 32, scope: !26)
|
||||
!31 = !DILocation(line: 7, column: 30, scope: !26)
|
||||
!32 = !DILocation(line: 7, column: 13, scope: !26)
|
|
@ -1,148 +0,0 @@
|
|||
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck --implicit-check-not "{{DW_TAG|NULL}}" %s
|
||||
|
||||
; inline __attribute__((always_inline))
|
||||
; int removed() {
|
||||
; {
|
||||
; static int A;
|
||||
; return A++;
|
||||
; }
|
||||
; }
|
||||
;
|
||||
; __attribute__((always_inline))
|
||||
; int not_removed() {
|
||||
; {
|
||||
; static int B;
|
||||
; return B++;
|
||||
; }
|
||||
; }
|
||||
;
|
||||
; int foo() {
|
||||
; {
|
||||
; static int C;
|
||||
; return ++C + removed() + not_removed();
|
||||
; }
|
||||
; }
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
|
||||
; Out-of-line definition of `not_removed()`.
|
||||
; The empty lexical block is created to match abstract origin.
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_abstract_origin {{.*}} "_Z11not_removedv"
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: NULL
|
||||
|
||||
; Abstract definition of `removed()`
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("removed")
|
||||
; CHECK: DW_AT_inline (DW_INL_inlined)
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("A")
|
||||
; CHECK: DW_AT_location (DW_OP_addr 0x0)
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_base_type
|
||||
|
||||
; Abstract definition of `not_removed()`
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("not_removed")
|
||||
; CHECK: DW_AT_inline (DW_INL_inlined)
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("B")
|
||||
; CHECK: DW_AT_location (DW_OP_addr 0x0)
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; Definition of foo().
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("foo")
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("C")
|
||||
; CHECK: DW_AT_location (DW_OP_addr 0x0)
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
$_ZZ7removedvE1A = comdat any
|
||||
|
||||
@_ZZ11not_removedvE1B = internal global i32 0, align 4, !dbg !0
|
||||
@_ZZ3foovE1C = internal global i32 0, align 4, !dbg !10
|
||||
@_ZZ7removedvE1A = linkonce_odr dso_local global i32 0, comdat, align 4, !dbg !15
|
||||
|
||||
; Function Attrs: alwaysinline mustprogress nounwind uwtable
|
||||
define dso_local i32 @_Z11not_removedv() #0 !dbg !4 {
|
||||
entry:
|
||||
%0 = load i32, i32* @_ZZ11not_removedvE1B, align 4, !dbg !25
|
||||
%inc = add nsw i32 %0, 1, !dbg !25
|
||||
store i32 %inc, i32* @_ZZ11not_removedvE1B, align 4, !dbg !25
|
||||
ret i32 %0, !dbg !26
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress noinline optnone uwtable
|
||||
define dso_local i32 @_Z3foov() #1 !dbg !13 {
|
||||
entry:
|
||||
%0 = load i32, i32* @_ZZ3foovE1C, align 4, !dbg !27
|
||||
%inc = add nsw i32 %0, 1, !dbg !27
|
||||
store i32 %inc, i32* @_ZZ3foovE1C, align 4, !dbg !27
|
||||
%1 = load i32, i32* @_ZZ7removedvE1A, align 4, !dbg !28
|
||||
%inc.i3 = add nsw i32 %1, 1, !dbg !28
|
||||
store i32 %inc.i3, i32* @_ZZ7removedvE1A, align 4, !dbg !28
|
||||
%add = add nsw i32 %inc, %1, !dbg !30
|
||||
%2 = load i32, i32* @_ZZ11not_removedvE1B, align 4, !dbg !31
|
||||
%inc.i = add nsw i32 %2, 1, !dbg !31
|
||||
store i32 %inc.i, i32* @_ZZ11not_removedvE1B, align 4, !dbg !31
|
||||
%add2 = add nsw i32 %add, %2, !dbg !33
|
||||
ret i32 %add2, !dbg !34
|
||||
}
|
||||
|
||||
attributes #0 = { alwaysinline mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { mustprogress noinline optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
|
||||
!llvm.dbg.cu = !{!8}
|
||||
!llvm.module.flags = !{!19, !20, !21, !22, !23}
|
||||
!llvm.ident = !{!24}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "B", scope: !2, file: !3, line: 13, type: !7, isLocal: true, isDefinition: true)
|
||||
!2 = distinct !DILexicalBlock(scope: !4, file: !3, line: 12, column: 3)
|
||||
!3 = !DIFile(filename: "test_static.cpp", directory: "/home/kbessonova/workspace/llvm/llvm-project/build")
|
||||
!4 = distinct !DISubprogram(name: "not_removed", linkageName: "_Z11not_removedv", scope: !3, file: !3, line: 11, type: !5, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !8, retainedNodes: !14)
|
||||
!5 = !DISubroutineType(types: !6)
|
||||
!6 = !{!7}
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 14.0.0 (git@github.com:llvm/llvm-project.git e1d09ac2d118825452bfc26e44565f7f4122fd6d)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !9, splitDebugInlining: false, nameTableKind: None)
|
||||
!9 = !{!0, !10, !15}
|
||||
!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression())
|
||||
!11 = distinct !DIGlobalVariable(name: "C", scope: !12, file: !3, line: 20, type: !7, isLocal: true, isDefinition: true)
|
||||
!12 = distinct !DILexicalBlock(scope: !13, file: !3, line: 19, column: 3)
|
||||
!13 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !3, file: !3, line: 18, type: !5, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !8, retainedNodes: !14)
|
||||
!14 = !{}
|
||||
!15 = !DIGlobalVariableExpression(var: !16, expr: !DIExpression())
|
||||
!16 = distinct !DIGlobalVariable(name: "A", scope: !17, file: !3, line: 5, type: !7, isLocal: false, isDefinition: true)
|
||||
!17 = distinct !DILexicalBlock(scope: !18, file: !3, line: 4, column: 3)
|
||||
!18 = distinct !DISubprogram(name: "removed", linkageName: "_Z7removedv", scope: !3, file: !3, line: 3, type: !5, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !8, retainedNodes: !14)
|
||||
!19 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!20 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!21 = !{i32 1, !"wchar_size", i32 4}
|
||||
!22 = !{i32 7, !"uwtable", i32 1}
|
||||
!23 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!24 = !{!"clang version 14.0.0 (git@github.com:llvm/llvm-project.git e1d09ac2d118825452bfc26e44565f7f4122fd6d)"}
|
||||
!25 = !DILocation(line: 14, column: 13, scope: !2)
|
||||
!26 = !DILocation(line: 14, column: 5, scope: !2)
|
||||
!27 = !DILocation(line: 21, column: 12, scope: !12)
|
||||
!28 = !DILocation(line: 6, column: 13, scope: !17, inlinedAt: !29)
|
||||
!29 = distinct !DILocation(line: 21, column: 18, scope: !12)
|
||||
!30 = !DILocation(line: 21, column: 16, scope: !12)
|
||||
!31 = !DILocation(line: 14, column: 13, scope: !2, inlinedAt: !32)
|
||||
!32 = distinct !DILocation(line: 21, column: 30, scope: !12)
|
||||
!33 = !DILocation(line: 21, column: 28, scope: !12)
|
||||
!34 = !DILocation(line: 21, column: 5, scope: !12)
|
|
@ -1,421 +0,0 @@
|
|||
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck --implicit-check-not "{{DW_TAG|NULL}}" %s
|
||||
|
||||
; inline __attribute__((always_inline))
|
||||
; void removed() {
|
||||
; struct A1 { int i; };
|
||||
; typedef int Int1;
|
||||
; {
|
||||
; struct I1 { Int1 j; };
|
||||
; struct C1 { typedef char Char1; Char1 c; };
|
||||
; A1 a1; a1.i++;
|
||||
; {
|
||||
; I1 i1; i1.j++;
|
||||
; C1 c1; c1.c++;
|
||||
; }
|
||||
; }
|
||||
; }
|
||||
;
|
||||
; __attribute__((always_inline))
|
||||
; void not_removed() {
|
||||
; struct A2 { int i; };
|
||||
; typedef int Int2;
|
||||
; {
|
||||
; struct I2 { Int2 j; };
|
||||
; struct C2 { typedef char Char2; Char2 c; };
|
||||
; A2 a2; a2.i++;
|
||||
; {
|
||||
; I2 i2; i2.j++;
|
||||
; C2 c2; c2.c++;
|
||||
; }
|
||||
; }
|
||||
; }
|
||||
;
|
||||
; void foo() {
|
||||
; struct A3 { int i; };
|
||||
; typedef int Int3;
|
||||
; {
|
||||
; struct I3 { Int3 j; };
|
||||
; {
|
||||
; struct C3 { typedef char Char3; Char3 c; };
|
||||
; A3 a3; a3.i++;
|
||||
; {
|
||||
; I3 i3; i3.j++;
|
||||
; C3 c3; c3.c++;
|
||||
; }
|
||||
; }
|
||||
; }
|
||||
; removed();
|
||||
; not_removed();
|
||||
; }
|
||||
;
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
|
||||
; Out-of-line definition of `not_removed()` shouldn't contain any debug info for types.
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_abstract_origin {{.*}} "_Z11not_removedv"
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_abstract_origin {{.*}} "a2"
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_abstract_origin {{.*}} "i2"
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_abstract_origin {{.*}} "c2"
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; Abstract definition of `removed()`.
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("removed")
|
||||
; CHECK: DW_AT_inline (DW_INL_inlined)
|
||||
|
||||
; I1 and C1 defined in the first lexical block, typedef Char1 is a child of C1.
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("a1")
|
||||
; CHECK: DW_AT_type {{.*}} "A1"
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_type {{.*}} "I1"
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_type {{.*}} "C1"
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("I1")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_type {{.*}} "Int1"
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("C1")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_type {{.*}} "C1::Char1"
|
||||
; CHECK: DW_TAG_typedef
|
||||
; CHECK: DW_AT_name ("Char1")
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; A1 and typedef Int1 defined in subprogram scope.
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("A1")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_typedef
|
||||
; CHECK: DW_AT_name ("Int1")
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_base_type
|
||||
; CHECK: DW_TAG_base_type
|
||||
|
||||
; Abstract definition of `not_removed()`.
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("not_removed")
|
||||
; CHECK: DW_AT_inline (DW_INL_inlined)
|
||||
|
||||
; I2 and C2 defined in the first lexical block, typedef Char2 is a child of C2.
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("a2")
|
||||
; CHECK: DW_AT_type {{.*}} "A2"
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("i2")
|
||||
; CHECK: DW_AT_type {{.*}} "I2"
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("c2")
|
||||
; CHECK: DW_AT_type {{.*}} "C2"
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("I2")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_type {{.*}} "Int2"
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("C2")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_type {{.*}} "C2::Char2"
|
||||
; CHECK: DW_TAG_typedef
|
||||
; CHECK: DW_AT_name ("Char2")
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; A2 and typedef Int2 defined in subprogram scope.
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("A2")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_typedef
|
||||
; CHECK: DW_AT_name ("Int2")
|
||||
; CHECK: NULL
|
||||
|
||||
; Definition of `foo()`.
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("foo")
|
||||
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("a3")
|
||||
; CHECK: DW_AT_type {{.*}} "A3"
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("i3")
|
||||
; CHECK: DW_AT_type {{.*}} "I3"
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("c3")
|
||||
; CHECK: DW_AT_type {{.*}} "C3"
|
||||
; CHECK: NULL
|
||||
|
||||
; C3 has the inner lexical block scope, typedef Char3 is a child of C3.
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("C3")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_type {{.*}} "C3::Char3"
|
||||
; CHECK: DW_TAG_typedef
|
||||
; CHECK: DW_AT_name ("Char3")
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: DW_AT_abstract_origin {{.*}} "_Z7removedv"
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_inlined_subroutine
|
||||
; CHECK: DW_AT_abstract_origin {{.*}} "_Z11not_removedv"
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; A3 and typedef Int3 defined in the subprogram scope.
|
||||
; FIXME: I3 has subprogram scope here, but should be in the outer lexical block
|
||||
; (which is ommitted). It wasn't placed correctly, because it's the only non-scope
|
||||
; entity in the block and it isn't listed in retainedTypes; we simply wasn't aware
|
||||
; about it while deciding whether to create a lexical block or not.
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("A3")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("I3")
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_type {{.*}} "Int3"
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_typedef
|
||||
; CHECK: DW_AT_name ("Int3")
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
%struct.A2 = type { i32 }
|
||||
%struct.I2 = type { i32 }
|
||||
%struct.C2 = type { i8 }
|
||||
%struct.A1 = type { i32 }
|
||||
%struct.I1 = type { i32 }
|
||||
%struct.C1 = type { i8 }
|
||||
%struct.A3 = type { i32 }
|
||||
%struct.I3 = type { i32 }
|
||||
%struct.C3 = type { i8 }
|
||||
|
||||
define dso_local void @_Z11not_removedv() !dbg !8 {
|
||||
entry:
|
||||
%a2 = alloca %struct.A2, align 4
|
||||
%i2 = alloca %struct.I2, align 4
|
||||
%c2 = alloca %struct.C2, align 1
|
||||
call void @llvm.dbg.declare(metadata %struct.A2* %a2, metadata !12, metadata !DIExpression()), !dbg !18
|
||||
%i = getelementptr inbounds %struct.A2, %struct.A2* %a2, i32 0, i32 0, !dbg !19
|
||||
%0 = load i32, i32* %i, align 4, !dbg !20
|
||||
%inc = add nsw i32 %0, 1, !dbg !20
|
||||
store i32 %inc, i32* %i, align 4, !dbg !20
|
||||
call void @llvm.dbg.declare(metadata %struct.I2* %i2, metadata !21, metadata !DIExpression()), !dbg !27
|
||||
%j = getelementptr inbounds %struct.I2, %struct.I2* %i2, i32 0, i32 0, !dbg !28
|
||||
%1 = load i32, i32* %j, align 4, !dbg !29
|
||||
%inc1 = add nsw i32 %1, 1, !dbg !29
|
||||
store i32 %inc1, i32* %j, align 4, !dbg !29
|
||||
call void @llvm.dbg.declare(metadata %struct.C2* %c2, metadata !30, metadata !DIExpression()), !dbg !36
|
||||
%c = getelementptr inbounds %struct.C2, %struct.C2* %c2, i32 0, i32 0, !dbg !37
|
||||
%2 = load i8, i8* %c, align 1, !dbg !38
|
||||
%inc2 = add i8 %2, 1, !dbg !38
|
||||
store i8 %inc2, i8* %c, align 1, !dbg !38
|
||||
ret void, !dbg !39
|
||||
}
|
||||
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
||||
|
||||
define dso_local void @_Z3foov() !dbg !40 {
|
||||
entry:
|
||||
%a1.i = alloca %struct.A1, align 4
|
||||
%i1.i = alloca %struct.I1, align 4
|
||||
%c1.i = alloca %struct.C1, align 1
|
||||
%a2.i = alloca %struct.A2, align 4
|
||||
%i2.i = alloca %struct.I2, align 4
|
||||
%c2.i = alloca %struct.C2, align 1
|
||||
%a3 = alloca %struct.A3, align 4
|
||||
%i3 = alloca %struct.I3, align 4
|
||||
%c3 = alloca %struct.C3, align 1
|
||||
call void @llvm.dbg.declare(metadata %struct.A3* %a3, metadata !41, metadata !DIExpression()), !dbg !47
|
||||
%i = getelementptr inbounds %struct.A3, %struct.A3* %a3, i32 0, i32 0, !dbg !48
|
||||
%0 = load i32, i32* %i, align 4, !dbg !49
|
||||
%inc = add nsw i32 %0, 1, !dbg !49
|
||||
store i32 %inc, i32* %i, align 4, !dbg !49
|
||||
call void @llvm.dbg.declare(metadata %struct.I3* %i3, metadata !50, metadata !DIExpression()), !dbg !56
|
||||
%j = getelementptr inbounds %struct.I3, %struct.I3* %i3, i32 0, i32 0, !dbg !57
|
||||
%1 = load i32, i32* %j, align 4, !dbg !58
|
||||
%inc1 = add nsw i32 %1, 1, !dbg !58
|
||||
store i32 %inc1, i32* %j, align 4, !dbg !58
|
||||
call void @llvm.dbg.declare(metadata %struct.C3* %c3, metadata !59, metadata !DIExpression()), !dbg !64
|
||||
%c = getelementptr inbounds %struct.C3, %struct.C3* %c3, i32 0, i32 0, !dbg !65
|
||||
%2 = load i8, i8* %c, align 1, !dbg !66
|
||||
%inc2 = add i8 %2, 1, !dbg !66
|
||||
store i8 %inc2, i8* %c, align 1, !dbg !66
|
||||
call void @llvm.dbg.declare(metadata %struct.A1* %a1.i, metadata !67, metadata !DIExpression()), !dbg !73
|
||||
%i.i3 = getelementptr inbounds %struct.A1, %struct.A1* %a1.i, i32 0, i32 0, !dbg !75
|
||||
%3 = load i32, i32* %i.i3, align 4, !dbg !76
|
||||
%inc.i4 = add nsw i32 %3, 1, !dbg !76
|
||||
store i32 %inc.i4, i32* %i.i3, align 4, !dbg !76
|
||||
call void @llvm.dbg.declare(metadata %struct.I1* %i1.i, metadata !77, metadata !DIExpression()), !dbg !83
|
||||
%j.i5 = getelementptr inbounds %struct.I1, %struct.I1* %i1.i, i32 0, i32 0, !dbg !84
|
||||
%4 = load i32, i32* %j.i5, align 4, !dbg !85
|
||||
%inc1.i6 = add nsw i32 %4, 1, !dbg !85
|
||||
store i32 %inc1.i6, i32* %j.i5, align 4, !dbg !85
|
||||
call void @llvm.dbg.declare(metadata %struct.C1* %c1.i, metadata !86, metadata !DIExpression()), !dbg !91
|
||||
%c.i7 = getelementptr inbounds %struct.C1, %struct.C1* %c1.i, i32 0, i32 0, !dbg !92
|
||||
%5 = load i8, i8* %c.i7, align 1, !dbg !93
|
||||
%inc2.i8 = add i8 %5, 1, !dbg !93
|
||||
store i8 %inc2.i8, i8* %c.i7, align 1, !dbg !93
|
||||
call void @llvm.dbg.declare(metadata %struct.A2* %a2.i, metadata !12, metadata !DIExpression()), !dbg !94
|
||||
%i.i = getelementptr inbounds %struct.A2, %struct.A2* %a2.i, i32 0, i32 0, !dbg !96
|
||||
%6 = load i32, i32* %i.i, align 4, !dbg !97
|
||||
%inc.i = add nsw i32 %6, 1, !dbg !97
|
||||
store i32 %inc.i, i32* %i.i, align 4, !dbg !97
|
||||
call void @llvm.dbg.declare(metadata %struct.I2* %i2.i, metadata !21, metadata !DIExpression()), !dbg !98
|
||||
%j.i = getelementptr inbounds %struct.I2, %struct.I2* %i2.i, i32 0, i32 0, !dbg !99
|
||||
%7 = load i32, i32* %j.i, align 4, !dbg !100
|
||||
%inc1.i = add nsw i32 %7, 1, !dbg !100
|
||||
store i32 %inc1.i, i32* %j.i, align 4, !dbg !100
|
||||
call void @llvm.dbg.declare(metadata %struct.C2* %c2.i, metadata !30, metadata !DIExpression()), !dbg !101
|
||||
%c.i = getelementptr inbounds %struct.C2, %struct.C2* %c2.i, i32 0, i32 0, !dbg !102
|
||||
%8 = load i8, i8* %c.i, align 1, !dbg !103
|
||||
%inc2.i = add i8 %8, 1, !dbg !103
|
||||
store i8 %inc2.i, i8* %c.i, align 1, !dbg !103
|
||||
ret void, !dbg !104
|
||||
}
|
||||
|
||||
!llvm.dbg.cu = !{!0}
|
||||
!llvm.module.flags = !{!2, !3, !4, !5, !6}
|
||||
!llvm.ident = !{!7}
|
||||
|
||||
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
|
||||
!1 = !DIFile(filename: "test.cpp", directory: "/")
|
||||
!2 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!4 = !{i32 1, !"wchar_size", i32 4}
|
||||
!5 = !{i32 7, !"uwtable", i32 1}
|
||||
!6 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!7 = !{!"clang version 14.0.0"}
|
||||
!8 = distinct !DISubprogram(name: "not_removed", linkageName: "_Z11not_removedv", scope: !1, file: !1, line: 17, type: !9, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !11)
|
||||
!9 = !DISubroutineType(types: !10)
|
||||
!10 = !{null}
|
||||
!11 = !{}
|
||||
!12 = !DILocalVariable(name: "a2", scope: !13, file: !1, line: 23, type: !14)
|
||||
!13 = distinct !DILexicalBlock(scope: !8, file: !1, line: 20, column: 3)
|
||||
!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A2", scope: !8, file: !1, line: 18, size: 32, flags: DIFlagTypePassByValue, elements: !15)
|
||||
!15 = !{!16}
|
||||
!16 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !14, file: !1, line: 18, baseType: !17, size: 32)
|
||||
!17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!18 = !DILocation(line: 23, column: 8, scope: !13)
|
||||
!19 = !DILocation(line: 23, column: 15, scope: !13)
|
||||
!20 = !DILocation(line: 23, column: 16, scope: !13)
|
||||
!21 = !DILocalVariable(name: "i2", scope: !22, file: !1, line: 25, type: !23)
|
||||
!22 = distinct !DILexicalBlock(scope: !13, file: !1, line: 24, column: 5)
|
||||
!23 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "I2", scope: !13, file: !1, line: 21, size: 32, flags: DIFlagTypePassByValue, elements: !24)
|
||||
!24 = !{!25}
|
||||
!25 = !DIDerivedType(tag: DW_TAG_member, name: "j", scope: !23, file: !1, line: 21, baseType: !26, size: 32)
|
||||
!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "Int2", scope: !8, file: !1, line: 19, baseType: !17)
|
||||
!27 = !DILocation(line: 25, column: 10, scope: !22)
|
||||
!28 = !DILocation(line: 25, column: 17, scope: !22)
|
||||
!29 = !DILocation(line: 25, column: 18, scope: !22)
|
||||
!30 = !DILocalVariable(name: "c2", scope: !22, file: !1, line: 26, type: !31)
|
||||
!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C2", scope: !13, file: !1, line: 22, size: 8, flags: DIFlagTypePassByValue, elements: !32)
|
||||
!32 = !{!33}
|
||||
!33 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !31, file: !1, line: 22, baseType: !34, size: 8)
|
||||
!34 = !DIDerivedType(tag: DW_TAG_typedef, name: "Char2", scope: !31, file: !1, line: 22, baseType: !35)
|
||||
!35 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
||||
!36 = !DILocation(line: 26, column: 10, scope: !22)
|
||||
!37 = !DILocation(line: 26, column: 17, scope: !22)
|
||||
!38 = !DILocation(line: 26, column: 18, scope: !22)
|
||||
!39 = !DILocation(line: 29, column: 1, scope: !8)
|
||||
!40 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 31, type: !9, scopeLine: 31, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !11)
|
||||
!41 = !DILocalVariable(name: "a3", scope: !42, file: !1, line: 38, type: !44)
|
||||
!42 = distinct !DILexicalBlock(scope: !43, file: !1, line: 36, column: 5)
|
||||
!43 = distinct !DILexicalBlock(scope: !40, file: !1, line: 34, column: 3)
|
||||
!44 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A3", scope: !40, file: !1, line: 32, size: 32, flags: DIFlagTypePassByValue, elements: !45)
|
||||
!45 = !{!46}
|
||||
!46 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !44, file: !1, line: 32, baseType: !17, size: 32)
|
||||
!47 = !DILocation(line: 38, column: 10, scope: !42)
|
||||
!48 = !DILocation(line: 38, column: 17, scope: !42)
|
||||
!49 = !DILocation(line: 38, column: 18, scope: !42)
|
||||
!50 = !DILocalVariable(name: "i3", scope: !51, file: !1, line: 40, type: !52)
|
||||
!51 = distinct !DILexicalBlock(scope: !42, file: !1, line: 39, column: 7)
|
||||
!52 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "I3", scope: !43, file: !1, line: 35, size: 32, flags: DIFlagTypePassByValue, elements: !53)
|
||||
!53 = !{!54}
|
||||
!54 = !DIDerivedType(tag: DW_TAG_member, name: "j", scope: !52, file: !1, line: 35, baseType: !55, size: 32)
|
||||
!55 = !DIDerivedType(tag: DW_TAG_typedef, name: "Int3", scope: !40, file: !1, line: 33, baseType: !17)
|
||||
!56 = !DILocation(line: 40, column: 12, scope: !51)
|
||||
!57 = !DILocation(line: 40, column: 19, scope: !51)
|
||||
!58 = !DILocation(line: 40, column: 20, scope: !51)
|
||||
!59 = !DILocalVariable(name: "c3", scope: !51, file: !1, line: 41, type: !60)
|
||||
!60 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C3", scope: !42, file: !1, line: 37, size: 8, flags: DIFlagTypePassByValue, elements: !61)
|
||||
!61 = !{!62}
|
||||
!62 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !60, file: !1, line: 37, baseType: !63, size: 8)
|
||||
!63 = !DIDerivedType(tag: DW_TAG_typedef, name: "Char3", scope: !60, file: !1, line: 37, baseType: !35)
|
||||
!64 = !DILocation(line: 41, column: 12, scope: !51)
|
||||
!65 = !DILocation(line: 41, column: 19, scope: !51)
|
||||
!66 = !DILocation(line: 41, column: 20, scope: !51)
|
||||
!67 = !DILocalVariable(name: "a1", scope: !68, file: !1, line: 8, type: !70)
|
||||
!68 = distinct !DILexicalBlock(scope: !69, file: !1, line: 5, column: 3)
|
||||
!69 = distinct !DISubprogram(name: "removed", linkageName: "_Z7removedv", scope: !1, file: !1, line: 2, type: !9, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !11)
|
||||
!70 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A1", scope: !69, file: !1, line: 3, size: 32, flags: DIFlagTypePassByValue, elements: !71, identifier: "_ZTSZ7removedvE2A1")
|
||||
!71 = !{!72}
|
||||
!72 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !70, file: !1, line: 3, baseType: !17, size: 32)
|
||||
!73 = !DILocation(line: 8, column: 8, scope: !68, inlinedAt: !74)
|
||||
!74 = distinct !DILocation(line: 45, column: 3, scope: !40)
|
||||
!75 = !DILocation(line: 8, column: 15, scope: !68, inlinedAt: !74)
|
||||
!76 = !DILocation(line: 8, column: 16, scope: !68, inlinedAt: !74)
|
||||
!77 = !DILocalVariable(name: "i1", scope: !78, file: !1, line: 10, type: !79)
|
||||
!78 = distinct !DILexicalBlock(scope: !68, file: !1, line: 9, column: 5)
|
||||
!79 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "I1", scope: !68, file: !1, line: 6, size: 32, flags: DIFlagTypePassByValue, elements: !80, identifier: "_ZTSZ7removedvE2I1")
|
||||
!80 = !{!81}
|
||||
!81 = !DIDerivedType(tag: DW_TAG_member, name: "j", scope: !79, file: !1, line: 6, baseType: !82, size: 32)
|
||||
!82 = !DIDerivedType(tag: DW_TAG_typedef, name: "Int1", scope: !69, file: !1, line: 4, baseType: !17)
|
||||
!83 = !DILocation(line: 10, column: 10, scope: !78, inlinedAt: !74)
|
||||
!84 = !DILocation(line: 10, column: 17, scope: !78, inlinedAt: !74)
|
||||
!85 = !DILocation(line: 10, column: 18, scope: !78, inlinedAt: !74)
|
||||
!86 = !DILocalVariable(name: "c1", scope: !78, file: !1, line: 11, type: !87)
|
||||
!87 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C1", scope: !68, file: !1, line: 7, size: 8, flags: DIFlagTypePassByValue, elements: !88, identifier: "_ZTSZ7removedvE2C1")
|
||||
!88 = !{!89}
|
||||
!89 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !87, file: !1, line: 7, baseType: !90, size: 8)
|
||||
!90 = !DIDerivedType(tag: DW_TAG_typedef, name: "Char1", scope: !87, file: !1, line: 7, baseType: !35)
|
||||
!91 = !DILocation(line: 11, column: 10, scope: !78, inlinedAt: !74)
|
||||
!92 = !DILocation(line: 11, column: 17, scope: !78, inlinedAt: !74)
|
||||
!93 = !DILocation(line: 11, column: 18, scope: !78, inlinedAt: !74)
|
||||
!94 = !DILocation(line: 23, column: 8, scope: !13, inlinedAt: !95)
|
||||
!95 = distinct !DILocation(line: 46, column: 3, scope: !40)
|
||||
!96 = !DILocation(line: 23, column: 15, scope: !13, inlinedAt: !95)
|
||||
!97 = !DILocation(line: 23, column: 16, scope: !13, inlinedAt: !95)
|
||||
!98 = !DILocation(line: 25, column: 10, scope: !22, inlinedAt: !95)
|
||||
!99 = !DILocation(line: 25, column: 17, scope: !22, inlinedAt: !95)
|
||||
!100 = !DILocation(line: 25, column: 18, scope: !22, inlinedAt: !95)
|
||||
!101 = !DILocation(line: 26, column: 10, scope: !22, inlinedAt: !95)
|
||||
!102 = !DILocation(line: 26, column: 17, scope: !22, inlinedAt: !95)
|
||||
!103 = !DILocation(line: 26, column: 18, scope: !22, inlinedAt: !95)
|
||||
!104 = !DILocation(line: 47, column: 1, scope: !40)
|
|
@ -13,19 +13,6 @@
|
|||
; CHECK-NOT: DW_AT_decl_file
|
||||
; CHECK-NOT: DW_AT_decl_line
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_MIPS_linkage_name
|
||||
; CHECK: DW_AT_name ("f1")
|
||||
; CHECK: [[FUNC1:.*]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_MIPS_linkage_name
|
||||
; CHECK: DW_AT_name ("f1")
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: [[FUNC_FWD:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("func_fwd")
|
||||
; CHECK-NOT: DW_AT_declaration
|
||||
|
||||
; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("i")
|
||||
; CHECK: [[VAR_FWD:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
|
||||
|
@ -37,6 +24,15 @@
|
|||
; CHECK: [[BAR:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("bar")
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_MIPS_linkage_name
|
||||
; CHECK: DW_AT_name ("f1")
|
||||
; CHECK: [[FUNC1:.*]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_MIPS_linkage_name
|
||||
; CHECK: DW_AT_name ("f1")
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: [[BAZ:0x[0-9a-f]*]]:{{.*}}DW_TAG_typedef
|
||||
; CHECK: DW_AT_name ("baz")
|
||||
|
||||
|
@ -47,6 +43,10 @@
|
|||
; CHECK: [[FUNC_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("func_decl")
|
||||
; CHECK: DW_AT_declaration
|
||||
|
||||
; CHECK: [[FUNC_FWD:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("func_fwd")
|
||||
; CHECK-NOT: DW_AT_declaration
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_imported_module
|
||||
|
@ -56,17 +56,18 @@
|
|||
; CHECK: DW_TAG_imported_declaration
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_base_type
|
||||
; CHECK: DW_TAG_imported_module
|
||||
; CHECK: DW_AT_decl_file ([[F2:.*]])
|
||||
; CHECK: DW_AT_decl_line (18)
|
||||
; CHECK: DW_AT_import ([[NS1]])
|
||||
; CHECK: DW_TAG_imported_declaration
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_MIPS_linkage_name
|
||||
; CHECK: DW_AT_name ("func")
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_imported_module
|
||||
; CHECK: DW_AT_decl_file ([[F2]])
|
||||
; CHECK: DW_AT_decl_line (23)
|
||||
; CHECK: DW_AT_import {{.*}}
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_imported_module
|
||||
; CHECK: DW_AT_decl_file ([[F2:.*]])
|
||||
; CHECK: DW_AT_decl_line (26)
|
||||
|
@ -117,16 +118,16 @@
|
|||
; CHECK: DW_AT_decl_file ([[F2]])
|
||||
; CHECK: DW_AT_decl_line (37)
|
||||
; CHECK: DW_AT_import ([[FUNC_FWD]])
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK: DW_TAG_imported_module
|
||||
; CHECK: DW_AT_decl_file ([[F2]])
|
||||
; CHECK: DW_AT_decl_line (23)
|
||||
; CHECK: DW_AT_import {{.*}}
|
||||
; CHECK: NULL
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_base_type
|
||||
; CHECK: DW_TAG_imported_module
|
||||
; CHECK: DW_AT_decl_file ([[F2:.*]])
|
||||
; CHECK: DW_AT_decl_line (18)
|
||||
; CHECK: DW_AT_import ([[NS1]])
|
||||
; CHECK: DW_TAG_imported_declaration
|
||||
; CHECK: DW_TAG_base_type
|
||||
; CHECK: NULL
|
||||
|
||||
; IR generated from clang/test/CodeGenCXX/debug-info-namespace.cpp, file paths
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
;
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name ("a")
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_TAG_unspecified_parameters
|
||||
;
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name ("b")
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
|
@ -22,16 +32,6 @@
|
|||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_TAG_unspecified_parameters
|
||||
;
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name ("a")
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_TAG_unspecified_parameters
|
||||
;
|
||||
; Variadic C++ member function.
|
||||
; struct A { void a(int c, ...); }
|
||||
;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# encountering an IMPLICIT_DEF in its own lexical scope.
|
||||
|
||||
# CHECK: .debug_info contents:
|
||||
# CHECK: DW_TAG_formal_parameter [13]
|
||||
# CHECK: DW_TAG_formal_parameter [14]
|
||||
# CHECK-NEXT: DW_AT_const_value [DW_FORM_udata] (0)
|
||||
# CHECK-NEXT: DW_AT_abstract_origin {{.*}} "name"
|
||||
--- |
|
||||
|
|
|
@ -105,6 +105,36 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
|||
; CHECK-NEXT:.b8 0 // EOM(1)
|
||||
; CHECK-NEXT:.b8 0 // EOM(2)
|
||||
; CHECK-NEXT:.b8 2 // Abbreviation Code
|
||||
; CHECK-NEXT:.b8 52 // DW_TAG_variable
|
||||
; CHECK-NEXT:.b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT:.b8 3 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 8 // DW_FORM_string
|
||||
; CHECK-NEXT:.b8 73 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 19 // DW_FORM_ref4
|
||||
; CHECK-NEXT:.b8 63 // DW_AT_external
|
||||
; CHECK-NEXT:.b8 12 // DW_FORM_flag
|
||||
; CHECK-NEXT:.b8 58 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 59 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 51 // DW_AT_address_class
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 2 // DW_AT_location
|
||||
; CHECK-NEXT:.b8 10 // DW_FORM_block1
|
||||
; CHECK-NEXT:.b8 0 // EOM(1)
|
||||
; CHECK-NEXT:.b8 0 // EOM(2)
|
||||
; CHECK-NEXT:.b8 3 // Abbreviation Code
|
||||
; CHECK-NEXT:.b8 36 // DW_TAG_base_type
|
||||
; CHECK-NEXT:.b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT:.b8 3 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 8 // DW_FORM_string
|
||||
; CHECK-NEXT:.b8 62 // DW_AT_encoding
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 11 // DW_AT_byte_size
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 0 // EOM(1)
|
||||
; CHECK-NEXT:.b8 0 // EOM(2)
|
||||
; CHECK-NEXT:.b8 4 // Abbreviation Code
|
||||
; CHECK-NEXT:.b8 46 // DW_TAG_subprogram
|
||||
; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes
|
||||
; CHECK-NEXT:.b8 17 // DW_AT_low_pc
|
||||
|
@ -126,7 +156,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
|||
; CHECK-NEXT:.b8 12 // DW_FORM_flag
|
||||
; CHECK-NEXT:.b8 0 // EOM(1)
|
||||
; CHECK-NEXT:.b8 0 // EOM(2)
|
||||
; CHECK-NEXT:.b8 3 // Abbreviation Code
|
||||
; CHECK-NEXT:.b8 5 // Abbreviation Code
|
||||
; CHECK-NEXT:.b8 5 // DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT:.b8 3 // DW_AT_name
|
||||
|
@ -139,36 +169,6 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
|||
; CHECK-NEXT:.b8 19 // DW_FORM_ref4
|
||||
; CHECK-NEXT:.b8 0 // EOM(1)
|
||||
; CHECK-NEXT:.b8 0 // EOM(2)
|
||||
; CHECK-NEXT:.b8 4 // Abbreviation Code
|
||||
; CHECK-NEXT:.b8 52 // DW_TAG_variable
|
||||
; CHECK-NEXT:.b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT:.b8 3 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 8 // DW_FORM_string
|
||||
; CHECK-NEXT:.b8 73 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 19 // DW_FORM_ref4
|
||||
; CHECK-NEXT:.b8 63 // DW_AT_external
|
||||
; CHECK-NEXT:.b8 12 // DW_FORM_flag
|
||||
; CHECK-NEXT:.b8 58 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 59 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 51 // DW_AT_address_class
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 2 // DW_AT_location
|
||||
; CHECK-NEXT:.b8 10 // DW_FORM_block1
|
||||
; CHECK-NEXT:.b8 0 // EOM(1)
|
||||
; CHECK-NEXT:.b8 0 // EOM(2)
|
||||
; CHECK-NEXT:.b8 5 // Abbreviation Code
|
||||
; CHECK-NEXT:.b8 36 // DW_TAG_base_type
|
||||
; CHECK-NEXT:.b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT:.b8 3 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 8 // DW_FORM_string
|
||||
; CHECK-NEXT:.b8 62 // DW_AT_encoding
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 11 // DW_AT_byte_size
|
||||
; CHECK-NEXT:.b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT:.b8 0 // EOM(1)
|
||||
; CHECK-NEXT:.b8 0 // EOM(2)
|
||||
; CHECK-NEXT:.b8 6 // Abbreviation Code
|
||||
; CHECK-NEXT:.b8 15 // DW_TAG_pointer_type
|
||||
; CHECK-NEXT:.b8 0 // DW_CHILDREN_no
|
||||
|
@ -258,7 +258,46 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
|||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b64 Lfunc_begin0 // DW_AT_low_pc
|
||||
; CHECK-NEXT:.b64 Lfunc_end0 // DW_AT_high_pc
|
||||
; CHECK-NEXT:.b8 2 // Abbrev [2] 0x65:0x45 DW_TAG_subprogram
|
||||
; CHECK-NEXT:.b8 2 // Abbrev [2] 0x65:0x1a DW_TAG_variable
|
||||
; CHECK-NEXT:.b8 71 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 76
|
||||
; CHECK-NEXT:.b8 79
|
||||
; CHECK-NEXT:.b8 66
|
||||
; CHECK-NEXT:.b8 65
|
||||
; CHECK-NEXT:.b8 76
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b32 127 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_external
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 3 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b8 5 // DW_AT_address_class
|
||||
; CHECK-NEXT:.b8 9 // DW_AT_location
|
||||
; CHECK-NEXT:.b8 3
|
||||
; CHECK-NEXT:.b64 GLOBAL
|
||||
; CHECK-NEXT:.b8 3 // Abbrev [3] 0x7f:0x7 DW_TAG_base_type
|
||||
; CHECK-NEXT:.b8 105 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 110
|
||||
; CHECK-NEXT:.b8 116
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b8 5 // DW_AT_encoding
|
||||
; CHECK-NEXT:.b8 4 // DW_AT_byte_size
|
||||
; CHECK-NEXT:.b8 2 // Abbrev [2] 0x86:0x1a DW_TAG_variable
|
||||
; CHECK-NEXT:.b8 83 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 72
|
||||
; CHECK-NEXT:.b8 65
|
||||
; CHECK-NEXT:.b8 82
|
||||
; CHECK-NEXT:.b8 69
|
||||
; CHECK-NEXT:.b8 68
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b32 127 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_external
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 4 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b8 8 // DW_AT_address_class
|
||||
; CHECK-NEXT:.b8 9 // DW_AT_location
|
||||
; CHECK-NEXT:.b8 3
|
||||
; CHECK-NEXT:.b64 SHARED
|
||||
; CHECK-NEXT:.b8 4 // Abbrev [4] 0xa0:0x45 DW_TAG_subprogram
|
||||
; CHECK-NEXT:.b64 Lfunc_begin0 // DW_AT_low_pc
|
||||
; CHECK-NEXT:.b64 Lfunc_end0 // DW_AT_high_pc
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_frame_base
|
||||
|
@ -276,71 +315,32 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
|||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 6 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_external
|
||||
; CHECK-NEXT:.b8 3 // Abbrev [3] 0x85:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 5 // Abbrev [5] 0xc0:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 97 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 6 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b32 229 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 3 // Abbrev [3] 0x8e:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 5 // Abbrev [5] 0xc9:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 120 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 6 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b32 238 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 3 // Abbrev [3] 0x97:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 5 // Abbrev [5] 0xd2:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 121 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 6 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b32 238 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 3 // Abbrev [3] 0xa0:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 5 // Abbrev [5] 0xdb:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT:.b8 105 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 6 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b32 196 // DW_AT_type
|
||||
; CHECK-NEXT:.b32 127 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 0 // End Of Children Mark
|
||||
; CHECK-NEXT:.b8 4 // Abbrev [4] 0xaa:0x1a DW_TAG_variable
|
||||
; CHECK-NEXT:.b8 71 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 76
|
||||
; CHECK-NEXT:.b8 79
|
||||
; CHECK-NEXT:.b8 66
|
||||
; CHECK-NEXT:.b8 65
|
||||
; CHECK-NEXT:.b8 76
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b32 196 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_external
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 3 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b8 5 // DW_AT_address_class
|
||||
; CHECK-NEXT:.b8 9 // DW_AT_location
|
||||
; CHECK-NEXT:.b8 3
|
||||
; CHECK-NEXT:.b64 GLOBAL
|
||||
; CHECK-NEXT:.b8 5 // Abbrev [5] 0xc4:0x7 DW_TAG_base_type
|
||||
; CHECK-NEXT:.b8 105 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 110
|
||||
; CHECK-NEXT:.b8 116
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b8 5 // DW_AT_encoding
|
||||
; CHECK-NEXT:.b8 4 // DW_AT_byte_size
|
||||
; CHECK-NEXT:.b8 4 // Abbrev [4] 0xcb:0x1a DW_TAG_variable
|
||||
; CHECK-NEXT:.b8 83 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 72
|
||||
; CHECK-NEXT:.b8 65
|
||||
; CHECK-NEXT:.b8 82
|
||||
; CHECK-NEXT:.b8 69
|
||||
; CHECK-NEXT:.b8 68
|
||||
; CHECK-NEXT:.b8 0
|
||||
; CHECK-NEXT:.b32 196 // DW_AT_type
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_external
|
||||
; CHECK-NEXT:.b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT:.b8 4 // DW_AT_decl_line
|
||||
; CHECK-NEXT:.b8 8 // DW_AT_address_class
|
||||
; CHECK-NEXT:.b8 9 // DW_AT_location
|
||||
; CHECK-NEXT:.b8 3
|
||||
; CHECK-NEXT:.b64 SHARED
|
||||
; CHECK-NEXT:.b8 5 // Abbrev [5] 0xe5:0x9 DW_TAG_base_type
|
||||
; CHECK-NEXT:.b8 3 // Abbrev [3] 0xe5:0x9 DW_TAG_base_type
|
||||
; CHECK-NEXT:.b8 102 // DW_AT_name
|
||||
; CHECK-NEXT:.b8 108
|
||||
; CHECK-NEXT:.b8 111
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -153,6 +153,15 @@ attributes #2 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp
|
|||
; CHECK-NEXT: .b8 0 // EOM(1)
|
||||
; CHECK-NEXT: .b8 0 // EOM(2)
|
||||
; CHECK-NEXT: .b8 2 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 19 // DW_TAG_structure_type
|
||||
; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT: .b8 3 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 8 // DW_FORM_string
|
||||
; CHECK-NEXT: .b8 60 // DW_AT_declaration
|
||||
; CHECK-NEXT: .b8 12 // DW_FORM_flag
|
||||
; CHECK-NEXT: .b8 0 // EOM(1)
|
||||
; CHECK-NEXT: .b8 0 // EOM(2)
|
||||
; CHECK-NEXT: .b8 3 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 46 // DW_TAG_subprogram
|
||||
; CHECK-NEXT: .b8 1 // DW_CHILDREN_yes
|
||||
; CHECK-NEXT: .b8 17 // DW_AT_low_pc
|
||||
|
@ -170,13 +179,11 @@ attributes #2 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp
|
|||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 59 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 73 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 19 // DW_FORM_ref4
|
||||
; CHECK-NEXT: .b8 63 // DW_AT_external
|
||||
; CHECK-NEXT: .b8 12 // DW_FORM_flag
|
||||
; CHECK-NEXT: .b8 0 // EOM(1)
|
||||
; CHECK-NEXT: .b8 0 // EOM(2)
|
||||
; CHECK-NEXT: .b8 3 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 4 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 5 // DW_TAG_formal_parameter
|
||||
; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT: .b8 3 // DW_AT_name
|
||||
|
@ -189,18 +196,20 @@ attributes #2 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp
|
|||
; CHECK-NEXT: .b8 19 // DW_FORM_ref4
|
||||
; CHECK-NEXT: .b8 0 // EOM(1)
|
||||
; CHECK-NEXT: .b8 0 // EOM(2)
|
||||
; CHECK-NEXT: .b8 4 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 36 // DW_TAG_base_type
|
||||
; CHECK-NEXT: .b8 5 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 52 // DW_TAG_variable
|
||||
; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT: .b8 3 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 8 // DW_FORM_string
|
||||
; CHECK-NEXT: .b8 62 // DW_AT_encoding
|
||||
; CHECK-NEXT: .b8 58 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 11 // DW_AT_byte_size
|
||||
; CHECK-NEXT: .b8 59 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 73 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 16 // DW_FORM_ref_addr
|
||||
; CHECK-NEXT: .b8 0 // EOM(1)
|
||||
; CHECK-NEXT: .b8 0 // EOM(2)
|
||||
; CHECK-NEXT: .b8 5 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 6 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 46 // DW_TAG_subprogram
|
||||
; CHECK-NEXT: .b8 1 // DW_CHILDREN_yes
|
||||
; CHECK-NEXT: .b8 17 // DW_AT_low_pc
|
||||
|
@ -218,149 +227,27 @@ attributes #2 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp
|
|||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 59 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 73 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 19 // DW_FORM_ref4
|
||||
; CHECK-NEXT: .b8 63 // DW_AT_external
|
||||
; CHECK-NEXT: .b8 12 // DW_FORM_flag
|
||||
; CHECK-NEXT: .b8 0 // EOM(1)
|
||||
; CHECK-NEXT: .b8 0 // EOM(2)
|
||||
; CHECK-NEXT: .b8 6 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 52 // DW_TAG_variable
|
||||
; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT: .b8 3 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 8 // DW_FORM_string
|
||||
; CHECK-NEXT: .b8 58 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 59 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 73 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 16 // DW_FORM_ref_addr
|
||||
; CHECK-NEXT: .b8 0 // EOM(1)
|
||||
; CHECK-NEXT: .b8 0 // EOM(2)
|
||||
; CHECK-NEXT: .b8 7 // Abbreviation Code
|
||||
; CHECK-NEXT: .b8 19 // DW_TAG_structure_type
|
||||
; CHECK-NEXT: .b8 36 // DW_TAG_base_type
|
||||
; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
|
||||
; CHECK-NEXT: .b8 3 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 8 // DW_FORM_string
|
||||
; CHECK-NEXT: .b8 60 // DW_AT_declaration
|
||||
; CHECK-NEXT: .b8 12 // DW_FORM_flag
|
||||
; CHECK-NEXT: .b8 62 // DW_AT_encoding
|
||||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 11 // DW_AT_byte_size
|
||||
; CHECK-NEXT: .b8 11 // DW_FORM_data1
|
||||
; CHECK-NEXT: .b8 0 // EOM(1)
|
||||
; CHECK-NEXT: .b8 0 // EOM(2)
|
||||
; CHECK-NEXT: .b8 0 // EOM(3)
|
||||
; CHECK-NEXT: }
|
||||
; CHECK-NEXT: .section .debug_info
|
||||
; CHECK-NEXT: {
|
||||
; CHECK-NEXT: .b32 152 // Length of Unit
|
||||
; CHECK-NEXT: .b8 2 // DWARF version number
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b32 .debug_abbrev // Offset Into Abbrev. Section
|
||||
; CHECK-NEXT: .b8 8 // Address Size (in bytes)
|
||||
; CHECK-NEXT: .b8 1 // Abbrev [1] 0xb:0x91 DW_TAG_compile_unit
|
||||
; CHECK-NEXT: .b8 99 // DW_AT_producer
|
||||
; CHECK-NEXT: .b8 108
|
||||
; CHECK-NEXT: .b8 97
|
||||
; CHECK-NEXT: .b8 110
|
||||
; CHECK-NEXT: .b8 103
|
||||
; CHECK-NEXT: .b8 32
|
||||
; CHECK-NEXT: .b8 118
|
||||
; CHECK-NEXT: .b8 101
|
||||
; CHECK-NEXT: .b8 114
|
||||
; CHECK-NEXT: .b8 115
|
||||
; CHECK-NEXT: .b8 105
|
||||
; CHECK-NEXT: .b8 111
|
||||
; CHECK-NEXT: .b8 110
|
||||
; CHECK-NEXT: .b8 32
|
||||
; CHECK-NEXT: .b8 51
|
||||
; CHECK-NEXT: .b8 46
|
||||
; CHECK-NEXT: .b8 53
|
||||
; CHECK-NEXT: .b8 46
|
||||
; CHECK-NEXT: .b8 48
|
||||
; CHECK-NEXT: .b8 32
|
||||
; CHECK-NEXT: .b8 40
|
||||
; CHECK-NEXT: .b8 50
|
||||
; CHECK-NEXT: .b8 49
|
||||
; CHECK-NEXT: .b8 48
|
||||
; CHECK-NEXT: .b8 52
|
||||
; CHECK-NEXT: .b8 55
|
||||
; CHECK-NEXT: .b8 57
|
||||
; CHECK-NEXT: .b8 41
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 4 // DW_AT_language
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 100 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 101
|
||||
; CHECK-NEXT: .b8 98
|
||||
; CHECK-NEXT: .b8 117
|
||||
; CHECK-NEXT: .b8 103
|
||||
; CHECK-NEXT: .b8 45
|
||||
; CHECK-NEXT: .b8 108
|
||||
; CHECK-NEXT: .b8 111
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 45
|
||||
; CHECK-NEXT: .b8 111
|
||||
; CHECK-NEXT: .b8 102
|
||||
; CHECK-NEXT: .b8 102
|
||||
; CHECK-NEXT: .b8 115
|
||||
; CHECK-NEXT: .b8 101
|
||||
; CHECK-NEXT: .b8 116
|
||||
; CHECK-NEXT: .b8 49
|
||||
; CHECK-NEXT: .b8 46
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b32 .debug_line // DW_AT_stmt_list
|
||||
; CHECK-NEXT: .b8 47 // DW_AT_comp_dir
|
||||
; CHECK-NEXT: .b8 108
|
||||
; CHECK-NEXT: .b8 108
|
||||
; CHECK-NEXT: .b8 118
|
||||
; CHECK-NEXT: .b8 109
|
||||
; CHECK-NEXT: .b8 95
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 109
|
||||
; CHECK-NEXT: .b8 97
|
||||
; CHECK-NEXT: .b8 107
|
||||
; CHECK-NEXT: .b8 101
|
||||
; CHECK-NEXT: .b8 95
|
||||
; CHECK-NEXT: .b8 103
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b64 Lfunc_begin0 // DW_AT_low_pc
|
||||
; CHECK-NEXT: .b64 Lfunc_end0 // DW_AT_high_pc
|
||||
; CHECK-NEXT: .b8 2 // Abbrev [2] 0x64:0x30 DW_TAG_subprogram
|
||||
; CHECK-NEXT: .b64 Lfunc_begin0 // DW_AT_low_pc
|
||||
; CHECK-NEXT: .b64 Lfunc_end0 // DW_AT_high_pc
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_frame_base
|
||||
; CHECK-NEXT: .b8 156
|
||||
; CHECK-NEXT: .b8 95 // DW_AT_MIPS_linkage_name
|
||||
; CHECK-NEXT: .b8 90
|
||||
; CHECK-NEXT: .b8 51
|
||||
; CHECK-NEXT: .b8 98
|
||||
; CHECK-NEXT: .b8 97
|
||||
; CHECK-NEXT: .b8 114
|
||||
; CHECK-NEXT: .b8 105
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 98 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 97
|
||||
; CHECK-NEXT: .b8 114
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b32 148 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_external
|
||||
; CHECK-NEXT: .b8 3 // Abbrev [3] 0x8a:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT: .b8 98 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b32 148 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 0 // End Of Children Mark
|
||||
; CHECK-NEXT: .b8 4 // Abbrev [4] 0x94:0x7 DW_TAG_base_type
|
||||
; CHECK-NEXT: .b8 105 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 110
|
||||
; CHECK-NEXT: .b8 116
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 5 // DW_AT_encoding
|
||||
; CHECK-NEXT: .b8 4 // DW_AT_byte_size
|
||||
; CHECK-NEXT: .b8 0 // End Of Children Mark
|
||||
; CHECK-NEXT: .b32 159 // Length of Unit
|
||||
; CHECK-NEXT: .b8 2 // DWARF version number
|
||||
; CHECK-NEXT: .b8 0
|
||||
|
@ -438,7 +325,11 @@ attributes #2 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp
|
|||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b64 Lfunc_begin1 // DW_AT_low_pc
|
||||
; CHECK-NEXT: .b64 Lfunc_end1 // DW_AT_high_pc
|
||||
; CHECK-NEXT: .b8 5 // Abbrev [5] 0x64:0x3a DW_TAG_subprogram
|
||||
; CHECK-NEXT: .b8 2 // Abbrev [2] 0x64:0x4 DW_TAG_structure_type
|
||||
; CHECK-NEXT: .b8 65 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_declaration
|
||||
; CHECK-NEXT: .b8 3 // Abbrev [3] 0x68:0x3a DW_TAG_subprogram
|
||||
; CHECK-NEXT: .b64 Lfunc_begin1 // DW_AT_low_pc
|
||||
; CHECK-NEXT: .b64 Lfunc_end1 // DW_AT_high_pc
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_frame_base
|
||||
|
@ -459,23 +350,132 @@ attributes #2 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp
|
|||
; CHECK-NEXT: .b8 2 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 6 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_external
|
||||
; CHECK-NEXT: .b8 3 // Abbrev [3] 0x87:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT: .b8 4 // Abbrev [4] 0x8b:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT: .b8 97 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 2 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 6 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b32 158 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 6 // Abbrev [6] 0x90:0xd DW_TAG_variable
|
||||
; CHECK-NEXT: .b32 100 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 5 // Abbrev [5] 0x94:0xd DW_TAG_variable
|
||||
; CHECK-NEXT: .b8 122 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 2 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 7 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b64 .debug_info+148 // DW_AT_type
|
||||
; CHECK-NEXT: .b64 .debug_info+311 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 0 // End Of Children Mark
|
||||
; CHECK-NEXT: .b8 7 // Abbrev [7] 0x9e:0x4 DW_TAG_structure_type
|
||||
; CHECK-NEXT: .b8 65 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 0 // End Of Children Mark
|
||||
; CHECK-NEXT: .b32 152 // Length of Unit
|
||||
; CHECK-NEXT: .b8 2 // DWARF version number
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_declaration
|
||||
; CHECK-NEXT: .b32 .debug_abbrev // Offset Into Abbrev. Section
|
||||
; CHECK-NEXT: .b8 8 // Address Size (in bytes)
|
||||
; CHECK-NEXT: .b8 1 // Abbrev [1] 0xb:0x91 DW_TAG_compile_unit
|
||||
; CHECK-NEXT: .b8 99 // DW_AT_producer
|
||||
; CHECK-NEXT: .b8 108
|
||||
; CHECK-NEXT: .b8 97
|
||||
; CHECK-NEXT: .b8 110
|
||||
; CHECK-NEXT: .b8 103
|
||||
; CHECK-NEXT: .b8 32
|
||||
; CHECK-NEXT: .b8 118
|
||||
; CHECK-NEXT: .b8 101
|
||||
; CHECK-NEXT: .b8 114
|
||||
; CHECK-NEXT: .b8 115
|
||||
; CHECK-NEXT: .b8 105
|
||||
; CHECK-NEXT: .b8 111
|
||||
; CHECK-NEXT: .b8 110
|
||||
; CHECK-NEXT: .b8 32
|
||||
; CHECK-NEXT: .b8 51
|
||||
; CHECK-NEXT: .b8 46
|
||||
; CHECK-NEXT: .b8 53
|
||||
; CHECK-NEXT: .b8 46
|
||||
; CHECK-NEXT: .b8 48
|
||||
; CHECK-NEXT: .b8 32
|
||||
; CHECK-NEXT: .b8 40
|
||||
; CHECK-NEXT: .b8 50
|
||||
; CHECK-NEXT: .b8 49
|
||||
; CHECK-NEXT: .b8 48
|
||||
; CHECK-NEXT: .b8 52
|
||||
; CHECK-NEXT: .b8 55
|
||||
; CHECK-NEXT: .b8 57
|
||||
; CHECK-NEXT: .b8 41
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 4 // DW_AT_language
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 100 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 101
|
||||
; CHECK-NEXT: .b8 98
|
||||
; CHECK-NEXT: .b8 117
|
||||
; CHECK-NEXT: .b8 103
|
||||
; CHECK-NEXT: .b8 45
|
||||
; CHECK-NEXT: .b8 108
|
||||
; CHECK-NEXT: .b8 111
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 45
|
||||
; CHECK-NEXT: .b8 111
|
||||
; CHECK-NEXT: .b8 102
|
||||
; CHECK-NEXT: .b8 102
|
||||
; CHECK-NEXT: .b8 115
|
||||
; CHECK-NEXT: .b8 101
|
||||
; CHECK-NEXT: .b8 116
|
||||
; CHECK-NEXT: .b8 49
|
||||
; CHECK-NEXT: .b8 46
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b32 .debug_line // DW_AT_stmt_list
|
||||
; CHECK-NEXT: .b8 47 // DW_AT_comp_dir
|
||||
; CHECK-NEXT: .b8 108
|
||||
; CHECK-NEXT: .b8 108
|
||||
; CHECK-NEXT: .b8 118
|
||||
; CHECK-NEXT: .b8 109
|
||||
; CHECK-NEXT: .b8 95
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 109
|
||||
; CHECK-NEXT: .b8 97
|
||||
; CHECK-NEXT: .b8 107
|
||||
; CHECK-NEXT: .b8 101
|
||||
; CHECK-NEXT: .b8 95
|
||||
; CHECK-NEXT: .b8 103
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 99
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b64 Lfunc_begin0 // DW_AT_low_pc
|
||||
; CHECK-NEXT: .b64 Lfunc_end0 // DW_AT_high_pc
|
||||
; CHECK-NEXT: .b8 6 // Abbrev [6] 0x64:0x30 DW_TAG_subprogram
|
||||
; CHECK-NEXT: .b64 Lfunc_begin0 // DW_AT_low_pc
|
||||
; CHECK-NEXT: .b64 Lfunc_end0 // DW_AT_high_pc
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_frame_base
|
||||
; CHECK-NEXT: .b8 156
|
||||
; CHECK-NEXT: .b8 95 // DW_AT_MIPS_linkage_name
|
||||
; CHECK-NEXT: .b8 90
|
||||
; CHECK-NEXT: .b8 51
|
||||
; CHECK-NEXT: .b8 98
|
||||
; CHECK-NEXT: .b8 97
|
||||
; CHECK-NEXT: .b8 114
|
||||
; CHECK-NEXT: .b8 105
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 98 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 97
|
||||
; CHECK-NEXT: .b8 114
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b32 148 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_external
|
||||
; CHECK-NEXT: .b8 4 // Abbrev [4] 0x8a:0x9 DW_TAG_formal_parameter
|
||||
; CHECK-NEXT: .b8 98 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_decl_file
|
||||
; CHECK-NEXT: .b8 1 // DW_AT_decl_line
|
||||
; CHECK-NEXT: .b32 148 // DW_AT_type
|
||||
; CHECK-NEXT: .b8 0 // End Of Children Mark
|
||||
; CHECK-NEXT: .b8 7 // Abbrev [7] 0x94:0x7 DW_TAG_base_type
|
||||
; CHECK-NEXT: .b8 105 // DW_AT_name
|
||||
; CHECK-NEXT: .b8 110
|
||||
; CHECK-NEXT: .b8 116
|
||||
; CHECK-NEXT: .b8 0
|
||||
; CHECK-NEXT: .b8 5 // DW_AT_encoding
|
||||
; CHECK-NEXT: .b8 4 // DW_AT_byte_size
|
||||
; CHECK-NEXT: .b8 0 // End Of Children Mark
|
||||
; CHECK-NEXT: }
|
||||
; CHECK-NEXT: .section .debug_loc { }
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
; 3: DwarfUnit::addUInt()
|
||||
; 4: addUInt(Block, (dwarf::Attribute)0, Form, Integer);
|
||||
|
||||
; CHECK: DW_AT_noreturn
|
||||
; CHECK: DW_AT_name ("var")
|
||||
; CHECK-NOT: DW_TAG_
|
||||
; CHECK: DW_AT_alignment
|
||||
; CHECK: DW_AT_location (DW_OP_addr 0x0)
|
||||
; CHECK: DW_AT_noreturn
|
||||
;
|
||||
; STRICT-NOT: DW_AT_noreturn
|
||||
; STRICT: DW_AT_name ("var")
|
||||
; STRICT-NOT: DW_AT_alignment
|
||||
; STRICT-NOT: DW_TAG_
|
||||
; STRICT: DW_AT_location (DW_OP_addr 0x0)
|
||||
; STRICT-NOT: DW_AT_noreturn
|
||||
|
||||
@_ZL3var = internal global i32 0, align 16, !dbg !0
|
||||
|
||||
|
|
|
@ -44,14 +44,6 @@ attributes #1 = { nounwind readnone }
|
|||
!15 = !DILocation(line: 4, column: 23, scope: !12)
|
||||
!16 = !DILocation(line: 5, column: 5, scope: !12)
|
||||
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "LOC")
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_decl_file [DW_FORM_data1] ("/work/llvm/vanilla/test/DebugInfo{{[/\\]}}test.c")
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_decl_line [DW_FORM_data1] (4)
|
||||
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "GLB")
|
||||
|
@ -60,3 +52,11 @@ attributes #1 = { nounwind readnone }
|
|||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_decl_line [DW_FORM_data1] (1)
|
||||
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "LOC")
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_decl_file [DW_FORM_data1] ("/work/llvm/vanilla/test/DebugInfo{{[/\\]}}test.c")
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_decl_line [DW_FORM_data1] (4)
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
; CHECK: .debug_info contents:
|
||||
|
||||
; CHECK: DW_TAG_subroutine_type [[subroutine_abbrev]] *
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] {{.*}}
|
||||
; CHECK-NEXT: DW_AT_calling_convention [DW_FORM_data1] (DW_CC_BORLAND_msfastcall)
|
||||
|
||||
; CHECK: DW_TAG_subprogram [{{.*}}] *
|
||||
; CHECK: DW_AT_low_pc
|
||||
; CHECK: DW_AT_high_pc
|
||||
|
@ -33,10 +37,6 @@
|
|||
; CHECK: DW_AT_type
|
||||
; CHECK: DW_AT_external
|
||||
|
||||
; CHECK: DW_TAG_subroutine_type [[subroutine_abbrev]] *
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] {{.*}}
|
||||
; CHECK-NEXT: DW_AT_calling_convention [DW_FORM_data1] (DW_CC_BORLAND_msfastcall)
|
||||
|
||||
; ModuleID = 't.cpp'
|
||||
source_filename = "t.cpp"
|
||||
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
|
|
|
@ -33,21 +33,6 @@
|
|||
; auto Lambda = [i](){};
|
||||
; }
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name{{.*}}"i"
|
||||
; CHECK: DW_AT_alignment{{.*}}32
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_class_type
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_name{{.*}}"i"
|
||||
; CHECK: DW_AT_alignment{{.*}}32
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
|
||||
; CHECK: DW_TAG_class_type
|
||||
; CHECK: DW_AT_name{{.*}}"C0"
|
||||
; CHECK: DW_AT_alignment{{.*}}64
|
||||
|
@ -68,6 +53,21 @@
|
|||
; CHECK: DW_TAG_enumerator
|
||||
; CHECK: DW_TAG_enumerator
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name{{.*}}"i"
|
||||
; CHECK: DW_AT_alignment{{.*}}32
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_class_type
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_name{{.*}}"i"
|
||||
; CHECK: DW_AT_alignment{{.*}}32
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
|
||||
; CHECK: DW_TAG_class_type
|
||||
; CHECK: DW_AT_name{{.*}}"C1"
|
||||
; CHECK: DW_TAG_member
|
||||
|
|
|
@ -16,14 +16,7 @@
|
|||
; }
|
||||
|
||||
; CHECK: DW_TAG_compile_unit
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name{{.*}}"i"
|
||||
; CHECK: DW_AT_alignment{{.*}}32
|
||||
; CHECK: DW_TAG_variable
|
||||
|
||||
; CHECK: DW_TAG_typedef
|
||||
; CHECK: DW_AT_name{{.*}}"S0"
|
||||
|
||||
|
@ -32,6 +25,12 @@
|
|||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_TAG_base_type
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_AT_name{{.*}}"i"
|
||||
; CHECK: DW_AT_alignment{{.*}}32
|
||||
|
||||
; CHECK: DW_TAG_typedef
|
||||
; CHECK: DW_AT_name{{.*}}"S1"
|
||||
; CHECK: DW_TAG_structure_type
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
; CHECK: .L_ZTId.DW.stub:
|
||||
|
||||
; CHECK: .data
|
||||
; CHECK-NEXT: .Lsec_end1:
|
||||
; CHECK-NEXT: .Lsec_end0:
|
||||
|
||||
source_filename = "test/DebugInfo/X86/arange-and-stub.ll"
|
||||
target triple = "x86_64-linux-gnu"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s
|
||||
|
||||
; Check that any type can have a vtable holder.
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: [[SP:.*]]: DW_TAG_structure_type
|
||||
; CHECK-NOT: TAG
|
||||
; CHECK: DW_AT_containing_type [DW_FORM_ref4]
|
||||
|
|
|
@ -33,10 +33,6 @@
|
|||
; A a;
|
||||
; B b;
|
||||
; U u;
|
||||
;
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name {{.*}}"free")
|
||||
; CHECK-NOT: DW_AT_accessibility
|
||||
|
||||
; CHECK: DW_TAG_member
|
||||
; CHECK: DW_AT_name {{.*}}"pub_default_static")
|
||||
|
@ -80,6 +76,12 @@
|
|||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name {{.*}}"union_pub_default")
|
||||
; CHECK-NOT: DW_AT_accessibility
|
||||
; CHECK: DW_TAG
|
||||
;
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name {{.*}}"free")
|
||||
; CHECK-NOT: DW_AT_accessibility
|
||||
; CHECK-NOT: DW_TAG
|
||||
;
|
||||
; ModuleID = '/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp'
|
||||
source_filename = "test/DebugInfo/X86/debug-info-access.ll"
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
; rdar://problem/9279956
|
||||
; test that the DW_AT_location of self is at ( fbreg +{{[0-9]+}}, deref, +{{[0-9]+}} )
|
||||
|
||||
; CHECK: [[A:.*]]: DW_TAG_structure_type
|
||||
; CHECK-NEXT: DW_AT_APPLE_objc_complete_type
|
||||
; CHECK-NEXT: DW_AT_name{{.*}}"A"
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_subprogram
|
||||
|
@ -31,10 +35,6 @@
|
|||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_artificial
|
||||
|
||||
; CHECK: [[A:.*]]: DW_TAG_structure_type
|
||||
; CHECK-NEXT: DW_AT_APPLE_objc_complete_type
|
||||
; CHECK-NEXT: DW_AT_name{{.*}}"A"
|
||||
|
||||
; CHECK: [[APTR]]: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: {[[A]]}
|
||||
|
||||
|
|
|
@ -106,8 +106,6 @@ attributes #1 = { nounwind readnone }
|
|||
; (for variables) or DW_AT_const_value (for constants).
|
||||
;
|
||||
; PRESENT: .debug_info contents:
|
||||
; PRESENT: DW_TAG_subprogram
|
||||
; PRESENT: DW_TAG_variable
|
||||
; PRESENT: DW_TAG_variable
|
||||
; PRESENT-NEXT: DW_AT_specification {{.*}} "a"
|
||||
; PRESENT-NEXT: DW_AT_location
|
||||
|
@ -158,8 +156,6 @@ attributes #1 = { nounwind readnone }
|
|||
|
||||
; For Darwin gdb:
|
||||
; DARWINP: .debug_info contents:
|
||||
; DARWINP: DW_TAG_subprogram
|
||||
; DARWINP: DW_TAG_variable
|
||||
; DARWINP: DW_TAG_variable
|
||||
; DARWINP-NEXT: DW_AT_specification {{.*}} "a"
|
||||
; DARWINP-NEXT: DW_AT_location
|
||||
|
|
|
@ -31,22 +31,6 @@
|
|||
#
|
||||
# Checking that we have two compile units with two sets of high/lo_pc.
|
||||
# CHECK: .debug_info contents
|
||||
#
|
||||
# CHECK: DW_TAG_compile_unit
|
||||
# CHECK: DW_AT_low_pc {{.*}} (0x00000000 ".text")
|
||||
# CHECK: DW_AT_high_pc
|
||||
#
|
||||
# CHECK: DW_TAG_subprogram
|
||||
# CHECK-NOT: DW_TAG
|
||||
# CHECK: DW_AT_linkage_name [DW_FORM_strp]{{.*}}"_Z3bari"
|
||||
# CHECK-NOT: {{DW_TAG|NULL}}
|
||||
# CHECK: DW_TAG_formal_parameter
|
||||
# CHECK-NOT: DW_TAG
|
||||
# CHECK: DW_AT_location [DW_FORM_sec_offset] ({{.*}}
|
||||
# CHECK-NEXT: [0x00000000, 0x0000000a) ".text": DW_OP_consts +0, DW_OP_stack_value
|
||||
# CHECK-NEXT: [0x0000000a, 0x00000017) ".text": DW_OP_consts +1, DW_OP_stack_value)
|
||||
# CHECK-NEXT: DW_AT_name [DW_FORM_strp]{{.*}}"b"
|
||||
|
||||
# CHECK: DW_TAG_compile_unit
|
||||
# CHECK: DW_AT_low_pc {{.*}} (0x00000020 ".text")
|
||||
# CHECK: DW_AT_high_pc
|
||||
|
@ -66,6 +50,21 @@
|
|||
# CHECK: DW_AT_location [DW_FORM_exprloc]
|
||||
# CHECK-NOT: DW_AT_location
|
||||
#
|
||||
# CHECK: DW_TAG_compile_unit
|
||||
# CHECK: DW_AT_low_pc {{.*}} (0x00000000 ".text")
|
||||
# CHECK: DW_AT_high_pc
|
||||
#
|
||||
# CHECK: DW_TAG_subprogram
|
||||
# CHECK-NOT: DW_TAG
|
||||
# CHECK: DW_AT_linkage_name [DW_FORM_strp]{{.*}}"_Z3bari"
|
||||
# CHECK-NOT: {{DW_TAG|NULL}}
|
||||
# CHECK: DW_TAG_formal_parameter
|
||||
# CHECK-NOT: DW_TAG
|
||||
# CHECK: DW_AT_location [DW_FORM_sec_offset] ({{.*}}
|
||||
# CHECK-NEXT: [0x00000000, 0x0000000a) ".text": DW_OP_consts +0, DW_OP_stack_value
|
||||
# CHECK-NEXT: [0x0000000a, 0x00000017) ".text": DW_OP_consts +1, DW_OP_stack_value)
|
||||
# CHECK-NEXT: DW_AT_name [DW_FORM_strp]{{.*}}"b"
|
||||
#
|
||||
# CHECK: .debug_loc contents:
|
||||
# CHECK: 0x00000000:
|
||||
# CHECK-NEXT: (0x00000000, 0x0000000a): DW_OP_consts +0, DW_OP_stack_value
|
||||
|
|
|
@ -8,22 +8,22 @@
|
|||
; -- alignment --
|
||||
; CHECK-NEXT: .zero 4,255
|
||||
|
||||
; <text section> - it should have made one span covering all functions in this CU.
|
||||
; CHECK-NEXT: .quad .Lfunc_begin0
|
||||
; CHECK-NEXT: .quad .Lsec_end0-.Lfunc_begin0
|
||||
|
||||
; <data section> - it should have made one span covering all vars in this CU.
|
||||
; CHECK-NEXT: .quad some_data
|
||||
; CHECK-NEXT: .quad .Lsec_end1-some_data
|
||||
; CHECK-NEXT: .quad .Lsec_end0-some_data
|
||||
|
||||
; <other sections> - it should have made one span covering all vars in this CU.
|
||||
; CHECK-NEXT: .quad some_other
|
||||
; CHECK-NEXT: .quad .Lsec_end2-some_other
|
||||
; CHECK-NEXT: .quad .Lsec_end1-some_other
|
||||
|
||||
; <common symbols> - it should have made one span for each symbol.
|
||||
; CHECK-NEXT: .quad some_bss
|
||||
; CHECK-NEXT: .quad 4
|
||||
|
||||
; <text section> - it should have made one span covering all functions in this CU.
|
||||
; CHECK-NEXT: .quad .Lfunc_begin0
|
||||
; CHECK-NEXT: .quad .Lsec_end2-.Lfunc_begin0
|
||||
|
||||
; -- finish --
|
||||
; CHECK-NEXT: # ARange terminator
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
; This assumes the variable will appear before the function.
|
||||
; LINKAGE1: .section .debug_info
|
||||
; LINKAGE1: DW_TAG_subprogram
|
||||
; LINKAGE1: DW_TAG_variable
|
||||
; LINKAGE1-NOT: DW_TAG
|
||||
; LINKAGE1: {{DW_AT_(MIPS_)?linkage_name}}
|
||||
; LINKAGE1: DW_TAG_variable
|
||||
; LINKAGE1: DW_TAG_subprogram
|
||||
; LINKAGE1-NOT: DW_TAG
|
||||
; LINKAGE1: {{DW_AT_(MIPS_)?linkage_name}}
|
||||
; LINKAGE1: .section
|
||||
|
|
|
@ -3,21 +3,21 @@
|
|||
|
||||
; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
|
||||
|
||||
; CHECK: [[MYMOD:0x[0-9a-f]+]]: DW_TAG_module
|
||||
; CHECK: DW_AT_name ("mymod")
|
||||
; CHECK: [[VAR1:0x[0-9a-f]+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("var1")
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("main")
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("use_renamed")
|
||||
; CHECK: DW_TAG_imported_module
|
||||
; CHECK: DW_AT_import ([[MYMOD:0x[0-9a-f]+]])
|
||||
; CHECK: DW_AT_import ([[MYMOD]])
|
||||
; CHECK: DW_TAG_imported_declaration
|
||||
; CHECK: DW_AT_import ([[VAR1:0x[0-9a-f]+]])
|
||||
; CHECK: DW_AT_import ([[VAR1]])
|
||||
; CHECK: DW_AT_name ("var4")
|
||||
|
||||
; CHECK: [[MYMOD]]: DW_TAG_module
|
||||
; CHECK: DW_AT_name ("mymod")
|
||||
; CHECK: [[VAR1]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("var1")
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;This test case is generated from
|
||||
;;module mymod
|
||||
|
|
|
@ -54,7 +54,12 @@
|
|||
; FISSION-LABEL: .debug_info.dwo contents:
|
||||
; CHECK: Compile Unit: length = [[CU_SIZE:[0-9a-f]+]]
|
||||
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: [[BAR:^0x........]]: DW_TAG_structure_type
|
||||
; CHECK-NEXT: DW_AT_declaration
|
||||
; CHECK-NEXT: DW_AT_signature {{.*}} (0x1d02f3be30cc5688)
|
||||
; CHECK: [[FLUFFY:^0x........]]: DW_TAG_class_type
|
||||
; CHECK-NEXT: DW_AT_declaration
|
||||
; CHECK-NEXT: DW_AT_signature {{.*}} (0xb04af47397402e77)
|
||||
|
||||
; Ensure the CU-local type 'walrus' is not placed in a type unit.
|
||||
; CHECK: [[WALRUS:^0x........]]: DW_TAG_structure_type
|
||||
|
@ -63,13 +68,6 @@
|
|||
; CHECK-NEXT: DW_AT_decl_file
|
||||
; CHECK-NEXT: DW_AT_decl_line
|
||||
|
||||
; CHECK: [[BAR:^0x........]]: DW_TAG_structure_type
|
||||
; CHECK-NEXT: DW_AT_declaration
|
||||
; CHECK-NEXT: DW_AT_signature {{.*}} (0x1d02f3be30cc5688)
|
||||
; CHECK: [[FLUFFY:^0x........]]: DW_TAG_class_type
|
||||
; CHECK-NEXT: DW_AT_declaration
|
||||
; CHECK-NEXT: DW_AT_signature {{.*}} (0xb04af47397402e77)
|
||||
|
||||
; CHECK: [[WOMBAT:^0x........]]: DW_TAG_structure_type
|
||||
; CHECK-NEXT: DW_AT_declaration
|
||||
; CHECK-NEXT: DW_AT_signature {{.*}} (0xfd756cee88f8a118)
|
||||
|
@ -123,10 +121,10 @@
|
|||
; CHECK-LABEL: .debug_line contents:
|
||||
; CHECK: Line table prologue
|
||||
; CHECK-NOT: file_names[
|
||||
; CHECK: file_names[
|
||||
; CHECK-NEXT: name: "bar.cpp"
|
||||
; SINGLE: file_names[
|
||||
; SINGLE-NEXT: name: "bar.h"
|
||||
; CHECK: file_names[
|
||||
; CHECK-NEXT: name: "bar.cpp"
|
||||
; CHECK-NOT: file_names[
|
||||
|
||||
; FISSION: .debug_line.dwo contents:
|
||||
|
|
|
@ -77,6 +77,9 @@
|
|||
; CHECK: DW_AT_GNU_pubnames (true)
|
||||
; CHECK-NOT: DW_AT_GNU_pubtypes [
|
||||
|
||||
; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_specification {{.*}} "static_member_variable"
|
||||
|
||||
; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name ("C")
|
||||
; CHECK: DW_TAG_member
|
||||
|
@ -95,23 +98,11 @@
|
|||
; CHECK: DW_AT_name ("int")
|
||||
; CHECK: DW_TAG_pointer_type
|
||||
|
||||
; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_specification {{.*}} "_ZN1C15member_functionEv"
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: [[STATIC_MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_specification {{.*}} "_ZN1C22static_member_functionEv"
|
||||
|
||||
; CHECK: [[GLOBAL_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_linkage_name
|
||||
; CHECK: DW_AT_name ("global_function")
|
||||
; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("global_variable")
|
||||
|
||||
; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace
|
||||
; CHECK: DW_AT_name ("ns")
|
||||
; CHECK: [[GLOB_NS_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_linkage_name
|
||||
; CHECK: DW_AT_name ("global_namespace_function")
|
||||
; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("global_namespace_variable")
|
||||
; CHECK-NOT: DW_AT_specification
|
||||
|
@ -127,6 +118,9 @@
|
|||
; CHECK: DW_TAG_member
|
||||
; CHECK: NULL
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: [[GLOB_NS_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_linkage_name
|
||||
; CHECK: DW_AT_name ("global_namespace_function")
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
|
@ -136,13 +130,6 @@
|
|||
; CHECK: DW_AT_location
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_specification {{.*}} "static_member_variable"
|
||||
|
||||
; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("global_variable")
|
||||
|
||||
; CHECK: [[ANON:.*]]: DW_TAG_namespace
|
||||
; CHECK-NOT: DW_AT_name
|
||||
; CHECK: [[ANON_I:.*]]: DW_TAG_variable
|
||||
|
@ -184,6 +171,20 @@
|
|||
; CHECK: NULL
|
||||
|
||||
; CHECK: DW_TAG_imported_declaration
|
||||
|
||||
; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_specification {{.*}} "_ZN1C15member_functionEv"
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
; CHECK: NULL
|
||||
|
||||
; CHECK: [[STATIC_MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_specification {{.*}} "_ZN1C22static_member_functionEv"
|
||||
|
||||
; CHECK: [[GLOBAL_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_linkage_name
|
||||
; CHECK: DW_AT_name ("global_function")
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_pointer_type
|
||||
; CHECK: DW_TAG_pointer_type
|
||||
; CHECK: NULL
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_TAG_imported_module
|
||||
|
||||
;; Abstract "bar" function
|
||||
; CHECK: [[Offset_bar]]: DW_TAG_subprogram
|
||||
|
@ -58,6 +60,9 @@
|
|||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_TAG_imported_module
|
||||
|
||||
|
||||
; Function Attrs: alwaysinline nounwind
|
||||
define i32 @_Z3barv() #0 !dbg !4 {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; RUN: llc -mtriple=x86_64-macosx %s -o %t -filetype=obj
|
||||
; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s
|
||||
|
||||
; CHECK: DW_TAG_subprogram [8] *
|
||||
; CHECK: DW_TAG_subprogram [9] *
|
||||
; CHECK-NOT: DW_AT_{{(MIPS_)?}}linkage_name
|
||||
; CHECK: DW_AT_specification
|
||||
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu %s -filetype=obj -o %t.o
|
||||
; RUN: llvm-dwarfdump %t.o | FileCheck %s
|
||||
;
|
||||
; CHECK: [[ITEM2:0x.+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("b")
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: [[ITEM1:0x.+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("a")
|
||||
; CHECK: [[ITEM2:0x.+]]: DW_TAG_variable
|
||||
; CHECK: DW_AT_name ("b")
|
||||
; CHECK: DW_TAG_namelist
|
||||
; CHECK: DW_AT_name ("nml")
|
||||
; CHECK: DW_TAG_namelist_item
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
; Based on the debuginfo-tests/sret.cpp code.
|
||||
|
||||
; CHECK-DWO: DW_AT_GNU_dwo_id (0x46a03e2a3394ce47)
|
||||
; CHECK-DWO: DW_AT_GNU_dwo_id (0x46a03e2a3394ce47)
|
||||
; CHECK-DWO: DW_AT_GNU_dwo_id (0xa58a336e896549f1)
|
||||
; CHECK-DWO: DW_AT_GNU_dwo_id (0xa58a336e896549f1)
|
||||
|
||||
; RUN: llc -O0 -fast-isel=true -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck -check-prefixes=CHECK,FASTISEL %s
|
||||
; RUN: llc -O0 -fast-isel=false -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck -check-prefixes=CHECK,SDAG %s
|
||||
|
|
|
@ -35,12 +35,12 @@
|
|||
; Check that there are no verifier failures, and that the SP for "main" appears
|
||||
; in the correct CU.
|
||||
; CHECK-LABEL: DW_TAG_compile_unit
|
||||
; CHECK: DW_AT_name ("1.cpp")
|
||||
; CHECK-NOT: DW_AT_name ("main")
|
||||
; CHECK-LABEL: DW_TAG_compile_unit
|
||||
; CHECK: DW_AT_name ("2.cpp")
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("main")
|
||||
; CHECK-LABEL: DW_TAG_compile_unit
|
||||
; CHECK: DW_AT_name ("1.cpp")
|
||||
; CHECK-NOT: DW_AT_name ("main")
|
||||
|
||||
source_filename = "ld-temp.o"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
|
|
|
@ -15,10 +15,26 @@
|
|||
|
||||
; VERIFY-NOT: error:
|
||||
|
||||
; CHECK: [[INT:0x[0-9a-f]*]]:{{ *}}DW_TAG_base_type
|
||||
; CHECK-NEXT: DW_AT_name{{.*}} = "int"
|
||||
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name{{.*}}"y_impl<int>"
|
||||
; CHECK-NOT: {{TAG|NULL}}
|
||||
; CHECK: DW_TAG_template_type_parameter
|
||||
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name{{.*}}"var"
|
||||
; CHECK-NOT: NULL
|
||||
; CHECK: DW_TAG_template_type_parameter
|
||||
; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INT]]}
|
||||
; CHECK-NEXT: DW_AT_name{{.*}}= "T"
|
||||
|
||||
|
||||
; CHECK: DW_AT_name{{.*}}"func<3, &glbl, y_impl, nullptr, E, 1, 2>"
|
||||
; CHECK-NOT: NULL
|
||||
; CHECK: DW_TAG_template_value_parameter
|
||||
; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INT:0x[0-9a-f]*]]}
|
||||
; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INT]]}
|
||||
; CHECK-NEXT: DW_AT_name{{.*}}= "x"
|
||||
; CHECK-NEXT: DW_AT_const_value [DW_FORM_sdata]{{.*}}(3)
|
||||
|
||||
|
@ -55,21 +71,6 @@
|
|||
; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INT]]}
|
||||
; CHECK-NEXT: DW_AT_const_value [DW_FORM_sdata]{{.*}}(2)
|
||||
|
||||
; CHECK: [[INT]]:{{ *}}DW_TAG_base_type
|
||||
; CHECK-NEXT: DW_AT_name{{.*}} = "int"
|
||||
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK: DW_AT_name{{.*}}"y_impl<int>"
|
||||
; CHECK-NOT: {{TAG|NULL}}
|
||||
; CHECK: DW_TAG_template_type_parameter
|
||||
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name{{.*}}"var"
|
||||
; CHECK-NOT: NULL
|
||||
; CHECK: DW_TAG_template_type_parameter
|
||||
; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INT]]}
|
||||
; CHECK-NEXT: DW_AT_name{{.*}}= "T"
|
||||
|
||||
; CHECK: [[INTPTR]]:{{ *}}DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type{{.*}} => {[[INT]]}
|
||||
|
||||
|
|
|
@ -30,45 +30,33 @@
|
|||
; that here instead of raw assembly printing
|
||||
|
||||
; FISSION: .section .debug_info.dwo,
|
||||
; 3 bytes of data in this DW_FORM_exprloc representation of the location of 'tls'
|
||||
; FISSION: .byte 3{{ *}}# DW_AT_location
|
||||
; DW_OP_GNU_const_index (0xfx == 252) to refer to the debug_addr table
|
||||
; FISSION-NEXT: .byte 252
|
||||
; an index of zero into the debug_addr table
|
||||
; FISSION-NEXT: .byte 0
|
||||
|
||||
; SINGLE: .section .debug_info,
|
||||
; DARWIN: .section {{.*}}debug_info,
|
||||
|
||||
; SINGLE-64: DW_TAG_variable
|
||||
; 10 bytes of data in this DW_FORM_exprloc representation of the location of 'tls'
|
||||
; SINGLE-64: .byte 10 # DW_AT_location
|
||||
; DW_OP_const8u (0x0e == 14) of address
|
||||
; SINGLE-64-NEXT: .byte 14
|
||||
; SINGLE-64-NEXT: .quad tls@DTPOFF
|
||||
|
||||
; DARWIN: DW_TAG_variable
|
||||
; DARWIN: .byte 10 ## DW_AT_location
|
||||
; DW_OP_const8u (0x0e == 14) of address
|
||||
; DARWIN-NEXT: .byte 14
|
||||
; DARWIN-NEXT: .quad _tls
|
||||
|
||||
; SINGLE-32: DW_TAG_variable
|
||||
; 6 bytes of data in 32-bit mode
|
||||
; SINGLE-32: .byte 6 # DW_AT_location
|
||||
; DW_OP_const4u (0x0e == 12) of address
|
||||
; SINGLE-32-NEXT: .byte 12
|
||||
; SINGLE-32-NEXT: .long tls@DTPOFF
|
||||
|
||||
; FISSION: DW_TAG_template_value_parameter
|
||||
; FISSION: .byte 3 # DW_AT_location
|
||||
; DW_OP_GNU_addr_index
|
||||
; FISSION-NEXT: .byte 251
|
||||
; FISSION-NEXT: .byte 2
|
||||
; DW_OP_stack_value
|
||||
; FISSION-NEXT: .byte 159
|
||||
|
||||
; FISSION: DW_TAG_variable
|
||||
; 3 bytes of data in this DW_FORM_exprloc representation of the location of 'tls'
|
||||
; FISSION: .byte 3{{ *}}# DW_AT_location
|
||||
; DW_OP_GNU_const_index (0xfx == 252) to refer to the debug_addr table
|
||||
; FISSION-NEXT: .byte 252
|
||||
; an index of 1 into the debug_addr table
|
||||
; FISSION-NEXT: .byte 1
|
||||
|
||||
; DW_OP_GNU_push_tls_address
|
||||
; GNUOP-NEXT: .byte 224
|
||||
; DW_OP_form_tls_address
|
||||
|
@ -78,12 +66,19 @@
|
|||
; FISSION: .byte 2 # DW_AT_location
|
||||
; DW_OP_GNU_addr_index
|
||||
; FISSION-NEXT: .byte 251
|
||||
; FISSION-NEXT: .byte 2
|
||||
; FISSION-NEXT: .byte 1
|
||||
|
||||
; FISSION: DW_TAG_template_value_parameter
|
||||
; FISSION: .byte 3 # DW_AT_location
|
||||
; DW_OP_GNU_addr_index
|
||||
; FISSION-NEXT: .byte 251
|
||||
; FISSION-NEXT: .byte 1
|
||||
; DW_OP_stack_value
|
||||
; FISSION-NEXT: .byte 159
|
||||
|
||||
; check that the expected TLS address description is the first thing in the debug_addr section
|
||||
; FISSION: .section .debug_addr
|
||||
; FISSION-NEXT: .Laddr_table_base0:
|
||||
; FISSION-NEXT: .quad .Lfunc_begin0
|
||||
; FISSION-NEXT: .quad tls@DTPOFF
|
||||
; FISSION-NEXT: .quad glbl
|
||||
; FISSION-NOT: .quad glbl
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
; RUN: llc -mtriple=x86_64-apple-darwin %s -o - -filetype=obj | llvm-dwarfdump - | FileCheck %s
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK: 0x00000[[G:.*]]: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name ("g")
|
||||
; CHECK: DW_TAG_array_type
|
||||
|
|
|
@ -43,6 +43,37 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
|
|||
!llvm.module.flags = !{!10, !11, !12, !13, !14}
|
||||
!llvm.ident = !{!15}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "g1", scope: !2, file: !3, line: 8, type: !6, isLocal: false, isDefinition: true, annotations: !7)
|
||||
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name ("g1")
|
||||
; CHECK: DW_TAG_LLVM_annotation
|
||||
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
|
||||
; CHECK-NEXT: DW_AT_const_value ("tag1")
|
||||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: DW_TAG_LLVM_annotation
|
||||
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
|
||||
; CHECK-NEXT: DW_AT_const_value ("tag2")
|
||||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: NULL
|
||||
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 13.0.0 (https://github.com/llvm/llvm-project.git 305231a4f71b68945b4dd92925c76ff49e377c86)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "t.c", directory: "/tmp/home/yhs/work/tests/llvm/btf_tag")
|
||||
!4 = !{}
|
||||
!5 = !{!0}
|
||||
!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!7 = !{!8, !9}
|
||||
!8 = !{!"btf_decl_tag", !"tag1"}
|
||||
!9 = !{!"btf_decl_tag", !"tag2"}
|
||||
!10 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!11 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!12 = !{i32 1, !"wchar_size", i32 4}
|
||||
!13 = !{i32 7, !"uwtable", i32 1}
|
||||
!14 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!15 = !{!"clang version 13.0.0 (https://github.com/llvm/llvm-project.git 305231a4f71b68945b4dd92925c76ff49e377c86)"}
|
||||
!16 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 10, type: !17, scopeLine: 10, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4, annotations: !7)
|
||||
|
||||
; CHECK: DW_TAG_subprogram
|
||||
; CHECK: DW_AT_name ("foo")
|
||||
; CHECK: DW_TAG_formal_parameter
|
||||
|
@ -66,17 +97,12 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
|
|||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: NULL
|
||||
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name ("g1")
|
||||
; CHECK: DW_TAG_LLVM_annotation
|
||||
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
|
||||
; CHECK-NEXT: DW_AT_const_value ("tag1")
|
||||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: DW_TAG_LLVM_annotation
|
||||
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
|
||||
; CHECK-NEXT: DW_AT_const_value ("tag2")
|
||||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: NULL
|
||||
!17 = !DISubroutineType(types: !18)
|
||||
!18 = !{!6, !19}
|
||||
!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64)
|
||||
!20 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t1", file: !3, line: 4, size: 32, elements: !21, annotations: !7)
|
||||
!21 = !{!22}
|
||||
!22 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !20, file: !3, line: 5, baseType: !6, size: 32, annotations: !7)
|
||||
|
||||
; CHECK: DW_TAG_structure_type
|
||||
; CHECK-NEXT: DW_AT_name ("t1")
|
||||
|
@ -102,29 +128,6 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
|
|||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: NULL
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "g1", scope: !2, file: !3, line: 8, type: !6, isLocal: false, isDefinition: true, annotations: !7)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 13.0.0 (https://github.com/llvm/llvm-project.git 305231a4f71b68945b4dd92925c76ff49e377c86)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "t.c", directory: "/tmp/home/yhs/work/tests/llvm/btf_tag")
|
||||
!4 = !{}
|
||||
!5 = !{!0}
|
||||
!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!7 = !{!8, !9}
|
||||
!8 = !{!"btf_decl_tag", !"tag1"}
|
||||
!9 = !{!"btf_decl_tag", !"tag2"}
|
||||
!10 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!11 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!12 = !{i32 1, !"wchar_size", i32 4}
|
||||
!13 = !{i32 7, !"uwtable", i32 1}
|
||||
!14 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!15 = !{!"clang version 13.0.0 (https://github.com/llvm/llvm-project.git 305231a4f71b68945b4dd92925c76ff49e377c86)"}
|
||||
!16 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 10, type: !17, scopeLine: 10, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4, annotations: !7)
|
||||
!17 = !DISubroutineType(types: !18)
|
||||
!18 = !{!6, !19}
|
||||
!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64)
|
||||
!20 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t1", file: !3, line: 4, size: 32, elements: !21, annotations: !7)
|
||||
!21 = !{!22}
|
||||
!22 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !20, file: !3, line: 5, baseType: !6, size: 32, annotations: !7)
|
||||
!23 = !DILocalVariable(name: "arg", arg: 1, scope: !16, file: !3, line: 10, type: !19, annotations: !7)
|
||||
!24 = !DILocation(line: 10, column: 48, scope: !16)
|
||||
!25 = !DILocation(line: 11, column: 10, scope: !16)
|
||||
|
|
|
@ -154,20 +154,20 @@
|
|||
; CHECK-NEXT: 0x16 R_WASM_SECTION_OFFSET_I32 .debug_line 0
|
||||
; CHECK-NEXT: 0x1A R_WASM_SECTION_OFFSET_I32 .debug_str 62
|
||||
; CHECK-NEXT: 0x1E R_WASM_FUNCTION_OFFSET_I32 f2 0
|
||||
; CHECK-NEXT: 0x27 R_WASM_FUNCTION_OFFSET_I32 f2 0
|
||||
; CHECK-NEXT: 0x32 R_WASM_GLOBAL_INDEX_I32 __stack_pointer
|
||||
; CHECK-NEXT: 0x37 R_WASM_SECTION_OFFSET_I32 .debug_str 118
|
||||
; CHECK-NEXT: 0x3E R_WASM_SECTION_OFFSET_I32 .debug_str 105
|
||||
; CHECK-NEXT: 0x4A R_WASM_MEMORY_ADDR_I32 foo 0
|
||||
; CHECK-NEXT: 0x54 R_WASM_SECTION_OFFSET_I32 .debug_str 109
|
||||
; CHECK-NEXT: 0x5B R_WASM_SECTION_OFFSET_I32 .debug_str 113
|
||||
; CHECK-NEXT: 0x67 R_WASM_MEMORY_ADDR_I32 ptr2 0
|
||||
; CHECK-NEXT: 0x27 R_WASM_SECTION_OFFSET_I32 .debug_str 105
|
||||
; CHECK-NEXT: 0x33 R_WASM_MEMORY_ADDR_I32 foo 0
|
||||
; CHECK-NEXT: 0x3D R_WASM_SECTION_OFFSET_I32 .debug_str 109
|
||||
; CHECK-NEXT: 0x44 R_WASM_SECTION_OFFSET_I32 .debug_str 113
|
||||
; CHECK-NEXT: 0x50 R_WASM_MEMORY_ADDR_I32 ptr2 0
|
||||
; CHECK-NEXT: 0x5B R_WASM_FUNCTION_OFFSET_I32 f2 0
|
||||
; CHECK-NEXT: 0x66 R_WASM_GLOBAL_INDEX_I32 __stack_pointer
|
||||
; CHECK-NEXT: 0x6B R_WASM_SECTION_OFFSET_I32 .debug_str 118
|
||||
; CHECK-NEXT: }
|
||||
; CHECK-NEXT: Section (10) .debug_aranges {
|
||||
; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_info 0
|
||||
; CHECK-NEXT: 0x10 R_WASM_FUNCTION_OFFSET_I32 f2 0
|
||||
; CHECK-NEXT: 0x18 R_WASM_MEMORY_ADDR_I32 foo 0
|
||||
; CHECK-NEXT: 0x20 R_WASM_MEMORY_ADDR_I32 ptr2 0
|
||||
; CHECK-NEXT: 0x10 R_WASM_MEMORY_ADDR_I32 foo 0
|
||||
; CHECK-NEXT: 0x18 R_WASM_MEMORY_ADDR_I32 ptr2 0
|
||||
; CHECK-NEXT: 0x20 R_WASM_FUNCTION_OFFSET_I32 f2 0
|
||||
; CHECK-NEXT: }
|
||||
; CHECK-NEXT: Section (12) .debug_pubnames {
|
||||
; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_info 0
|
||||
|
|
|
@ -160,20 +160,20 @@
|
|||
; CHECK-NEXT: 0x16 R_WASM_SECTION_OFFSET_I32 .debug_line 0
|
||||
; CHECK-NEXT: 0x1A R_WASM_SECTION_OFFSET_I32 .debug_str 62
|
||||
; CHECK-NEXT: 0x1E R_WASM_FUNCTION_OFFSET_I64 f2 0
|
||||
; CHECK-NEXT: 0x2B R_WASM_FUNCTION_OFFSET_I64 f2 0
|
||||
; CHECK-NEXT: 0x3A R_WASM_GLOBAL_INDEX_I32 __stack_pointer
|
||||
; CHECK-NEXT: 0x3F R_WASM_SECTION_OFFSET_I32 .debug_str 118
|
||||
; CHECK-NEXT: 0x46 R_WASM_SECTION_OFFSET_I32 .debug_str 105
|
||||
; CHECK-NEXT: 0x52 R_WASM_MEMORY_ADDR_I64 foo 0
|
||||
; CHECK-NEXT: 0x60 R_WASM_SECTION_OFFSET_I32 .debug_str 109
|
||||
; CHECK-NEXT: 0x67 R_WASM_SECTION_OFFSET_I32 .debug_str 113
|
||||
; CHECK-NEXT: 0x73 R_WASM_MEMORY_ADDR_I64 ptr2 0
|
||||
; CHECK-NEXT: 0x2B R_WASM_SECTION_OFFSET_I32 .debug_str 105
|
||||
; CHECK-NEXT: 0x37 R_WASM_MEMORY_ADDR_I64 foo 0
|
||||
; CHECK-NEXT: 0x45 R_WASM_SECTION_OFFSET_I32 .debug_str 109
|
||||
; CHECK-NEXT: 0x4C R_WASM_SECTION_OFFSET_I32 .debug_str 113
|
||||
; CHECK-NEXT: 0x58 R_WASM_MEMORY_ADDR_I64 ptr2 0
|
||||
; CHECK-NEXT: 0x67 R_WASM_FUNCTION_OFFSET_I64 f2 0
|
||||
; CHECK-NEXT: 0x76 R_WASM_GLOBAL_INDEX_I32 __stack_pointer
|
||||
; CHECK-NEXT: 0x7B R_WASM_SECTION_OFFSET_I32 .debug_str 118
|
||||
; CHECK-NEXT: }
|
||||
; CHECK-NEXT: Section (10) .debug_aranges {
|
||||
; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_info 0
|
||||
; CHECK-NEXT: 0x10 R_WASM_FUNCTION_OFFSET_I64 f2 0
|
||||
; CHECK-NEXT: 0x20 R_WASM_MEMORY_ADDR_I64 foo 0
|
||||
; CHECK-NEXT: 0x30 R_WASM_MEMORY_ADDR_I64 ptr2 0
|
||||
; CHECK-NEXT: 0x10 R_WASM_MEMORY_ADDR_I64 foo 0
|
||||
; CHECK-NEXT: 0x20 R_WASM_MEMORY_ADDR_I64 ptr2 0
|
||||
; CHECK-NEXT: 0x30 R_WASM_FUNCTION_OFFSET_I64 f2 0
|
||||
; CHECK-NEXT: }
|
||||
; CHECK-NEXT: Section (12) .debug_pubnames {
|
||||
; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_info 0
|
||||
|
|
|
@ -15,7 +15,37 @@
|
|||
; CHECK-NEXT: DW_AT_low_pc (0x00000002)
|
||||
; CHECK-NEXT: DW_AT_high_pc (0x00000004)
|
||||
|
||||
; CHECK: 0x00000026: DW_TAG_subprogram
|
||||
; CHECK: 0x00000026: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name ("foo")
|
||||
; CHECK-NEXT: DW_AT_type (0x00000037 "int *")
|
||||
; CHECK-NEXT: DW_AT_external (true)
|
||||
; CHECK-NEXT: DW_AT_decl_file ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
|
||||
; CHECK-NEXT: DW_AT_decl_line (4)
|
||||
; CHECK-NEXT: DW_AT_location (DW_OP_addr 0x0)
|
||||
|
||||
; CHECK: 0x00000037: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type (0x0000003c "int")
|
||||
|
||||
; CHECK: 0x0000003c: DW_TAG_base_type
|
||||
; CHECK-NEXT: DW_AT_name ("int")
|
||||
; CHECK-NEXT: DW_AT_encoding (DW_ATE_signed)
|
||||
; CHECK-NEXT: DW_AT_byte_size (0x04)
|
||||
|
||||
; CHECK: 0x00000043: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name ("ptr2")
|
||||
; CHECK-NEXT: DW_AT_type (0x00000054 "void (*)()")
|
||||
; CHECK-NEXT: DW_AT_external (true)
|
||||
; CHECK-NEXT: DW_AT_decl_file ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
|
||||
; CHECK-NEXT: DW_AT_decl_line (5)
|
||||
; CHECK-NEXT: DW_AT_location (DW_OP_addr 0x4)
|
||||
|
||||
; CHECK: 0x00000054: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type (0x00000059 "void ()")
|
||||
|
||||
; CHECK: 0x00000059: DW_TAG_subroutine_type
|
||||
; CHECK-NEXT: DW_AT_prototyped (true)
|
||||
|
||||
; CHECK: 0x0000005a: DW_TAG_subprogram
|
||||
; CHECK-NEXT: DW_AT_low_pc (0x00000002)
|
||||
; CHECK-NEXT: DW_AT_high_pc (0x00000004)
|
||||
; CHECK-NEXT: DW_AT_frame_base (DW_OP_WASM_location 0x3 0x0, DW_OP_stack_value)
|
||||
|
@ -25,36 +55,6 @@
|
|||
; CHECK-NEXT: DW_AT_prototyped (true)
|
||||
; CHECK-NEXT: DW_AT_external (true)
|
||||
|
||||
; CHECK: 0x0000003d: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name ("foo")
|
||||
; CHECK-NEXT: DW_AT_type (0x0000004e "int *")
|
||||
; CHECK-NEXT: DW_AT_external (true)
|
||||
; CHECK-NEXT: DW_AT_decl_file ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
|
||||
; CHECK-NEXT: DW_AT_decl_line (4)
|
||||
; CHECK-NEXT: DW_AT_location (DW_OP_addr 0x0)
|
||||
|
||||
; CHECK: 0x0000004e: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type (0x00000053 "int")
|
||||
|
||||
; CHECK: 0x00000053: DW_TAG_base_type
|
||||
; CHECK-NEXT: DW_AT_name ("int")
|
||||
; CHECK-NEXT: DW_AT_encoding (DW_ATE_signed)
|
||||
; CHECK-NEXT: DW_AT_byte_size (0x04)
|
||||
|
||||
; CHECK: 0x0000005a: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name ("ptr2")
|
||||
; CHECK-NEXT: DW_AT_type (0x0000006b "void (*)()")
|
||||
; CHECK-NEXT: DW_AT_external (true)
|
||||
; CHECK-NEXT: DW_AT_decl_file ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
|
||||
; CHECK-NEXT: DW_AT_decl_line (5)
|
||||
; CHECK-NEXT: DW_AT_location (DW_OP_addr 0x4)
|
||||
|
||||
; CHECK: 0x0000006b: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type (0x00000070 "void ()")
|
||||
|
||||
; CHECK: 0x00000070: DW_TAG_subroutine_type
|
||||
; CHECK-NEXT: DW_AT_prototyped (true)
|
||||
|
||||
; CHECK: 0x00000071: NULL
|
||||
|
||||
|
||||
|
@ -66,10 +66,40 @@
|
|||
; SPLIT-NEXT: DW_AT_language (DW_LANG_C99)
|
||||
; SPLIT-NEXT: DW_AT_name ("test.c")
|
||||
; SPLIT-NEXT: DW_AT_GNU_dwo_name ("{{.*}}dwarfdump.ll.tmp.dwo")
|
||||
; SPLIT-NEXT: DW_AT_GNU_dwo_id (0x0642bb5dada25ca6)
|
||||
; SPLIT-NEXT: DW_AT_GNU_dwo_id (0xad3151f12153fa17)
|
||||
|
||||
; SPLIT: 0x00000019: DW_TAG_subprogram
|
||||
; SPLIT-NEXT: DW_AT_low_pc (indexed (00000000) address = <unresolved>)
|
||||
; SPLIT: 0x00000019: DW_TAG_variable
|
||||
; SPLIT-NEXT: DW_AT_name ("foo")
|
||||
; SPLIT-NEXT: DW_AT_type (0x00000024 "int *")
|
||||
; SPLIT-NEXT: DW_AT_external (true)
|
||||
; SPLIT-NEXT: DW_AT_decl_file (0x01)
|
||||
; SPLIT-NEXT: DW_AT_decl_line (4)
|
||||
; SPLIT-NEXT: DW_AT_location (DW_OP_GNU_addr_index 0x0)
|
||||
|
||||
; SPLIT: 0x00000024: DW_TAG_pointer_type
|
||||
; SPLIT-NEXT: DW_AT_type (0x00000029 "int")
|
||||
|
||||
; SPLIT: 0x00000029: DW_TAG_base_type
|
||||
; SPLIT-NEXT: DW_AT_name ("int")
|
||||
; SPLIT-NEXT: DW_AT_encoding (DW_ATE_signed)
|
||||
; SPLIT-NEXT: DW_AT_byte_size (0x04)
|
||||
|
||||
; SPLIT: 0x0000002d: DW_TAG_variable
|
||||
; SPLIT-NEXT: DW_AT_name ("ptr2")
|
||||
; SPLIT-NEXT: DW_AT_type (0x00000038 "void (*)()")
|
||||
; SPLIT-NEXT: DW_AT_external (true)
|
||||
; SPLIT-NEXT: DW_AT_decl_file (0x01)
|
||||
; SPLIT-NEXT: DW_AT_decl_line (5)
|
||||
; SPLIT-NEXT: DW_AT_location (DW_OP_GNU_addr_index 0x1)
|
||||
|
||||
; SPLIT: 0x00000038: DW_TAG_pointer_type
|
||||
; SPLIT-NEXT: DW_AT_type (0x0000003d "void ()")
|
||||
|
||||
; SPLIT: 0x0000003d: DW_TAG_subroutine_type
|
||||
; SPLIT-NEXT: DW_AT_prototyped (true)
|
||||
|
||||
; SPLIT: 0x0000003e: DW_TAG_subprogram
|
||||
; SPLIT-NEXT: DW_AT_low_pc (indexed (00000002) address = <unresolved>)
|
||||
; SPLIT-NEXT: DW_AT_high_pc (0x00000002)
|
||||
; SPLIT-NEXT: DW_AT_frame_base (DW_OP_WASM_location 0x3 0x0, DW_OP_stack_value)
|
||||
; SPLIT-NEXT: DW_AT_name ("f2")
|
||||
|
@ -78,36 +108,6 @@
|
|||
; SPLIT-NEXT: DW_AT_prototyped (true)
|
||||
; SPLIT-NEXT: DW_AT_external (true)
|
||||
|
||||
; SPLIT: 0x0000002a: DW_TAG_variable
|
||||
; SPLIT-NEXT: DW_AT_name ("foo")
|
||||
; SPLIT-NEXT: DW_AT_type (0x00000035 "int *")
|
||||
; SPLIT-NEXT: DW_AT_external (true)
|
||||
; SPLIT-NEXT: DW_AT_decl_file (0x01)
|
||||
; SPLIT-NEXT: DW_AT_decl_line (4)
|
||||
; SPLIT-NEXT: DW_AT_location (DW_OP_GNU_addr_index 0x1)
|
||||
|
||||
; SPLIT: 0x00000035: DW_TAG_pointer_type
|
||||
; SPLIT-NEXT: DW_AT_type (0x0000003a "int")
|
||||
|
||||
; SPLIT: 0x0000003a: DW_TAG_base_type
|
||||
; SPLIT-NEXT: DW_AT_name ("int")
|
||||
; SPLIT-NEXT: DW_AT_encoding (DW_ATE_signed)
|
||||
; SPLIT-NEXT: DW_AT_byte_size (0x04)
|
||||
|
||||
; SPLIT: 0x0000003e: DW_TAG_variable
|
||||
; SPLIT-NEXT: DW_AT_name ("ptr2")
|
||||
; SPLIT-NEXT: DW_AT_type (0x00000049 "void (*)()")
|
||||
; SPLIT-NEXT: DW_AT_external (true)
|
||||
; SPLIT-NEXT: DW_AT_decl_file (0x01)
|
||||
; SPLIT-NEXT: DW_AT_decl_line (5)
|
||||
; SPLIT-NEXT: DW_AT_location (DW_OP_GNU_addr_index 0x2)
|
||||
|
||||
; SPLIT: 0x00000049: DW_TAG_pointer_type
|
||||
; SPLIT-NEXT: DW_AT_type (0x0000004e "void ()")
|
||||
|
||||
; SPLIT: 0x0000004e: DW_TAG_subroutine_type
|
||||
; SPLIT-NEXT: DW_AT_prototyped (true)
|
||||
|
||||
; SPLIT: 0x0000004f: NULL
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,37 @@
|
|||
; CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000002)
|
||||
; CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000002)
|
||||
|
||||
; CHECK: 0x0000002a: DW_TAG_subprogram
|
||||
; CHECK: 0x0000002a: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ("foo")
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (0x0000003f "int *")
|
||||
; CHECK-NEXT: DW_AT_external [DW_FORM_flag_present] (true)
|
||||
; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
|
||||
; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] (4)
|
||||
; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x0)
|
||||
|
||||
; CHECK: 0x0000003f: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (0x00000044 "int")
|
||||
|
||||
; CHECK: 0x00000044: DW_TAG_base_type
|
||||
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ("int")
|
||||
; CHECK-NEXT: DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
|
||||
; CHECK-NEXT: DW_AT_byte_size [DW_FORM_data1] (0x04)
|
||||
|
||||
; CHECK: 0x0000004b: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ("ptr2")
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (0x00000060 "void (*)()")
|
||||
; CHECK-NEXT: DW_AT_external [DW_FORM_flag_present] (true)
|
||||
; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
|
||||
; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] (5)
|
||||
; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x8)
|
||||
|
||||
; CHECK: 0x00000060: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (0x00000065 "void ()")
|
||||
|
||||
; CHECK: 0x00000065: DW_TAG_subroutine_type
|
||||
; CHECK-NEXT: DW_AT_prototyped [DW_FORM_flag_present] (true)
|
||||
|
||||
; CHECK: 0x00000066: DW_TAG_subprogram
|
||||
; CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000002)
|
||||
; CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000002)
|
||||
; CHECK-NEXT: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_WASM_location 0x3 0x0, DW_OP_stack_value)
|
||||
|
@ -24,36 +54,6 @@
|
|||
; CHECK-NEXT: DW_AT_prototyped [DW_FORM_flag_present] (true)
|
||||
; CHECK-NEXT: DW_AT_external [DW_FORM_flag_present] (true)
|
||||
|
||||
; CHECK: 0x00000045: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ("foo")
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (0x0000005a "int *")
|
||||
; CHECK-NEXT: DW_AT_external [DW_FORM_flag_present] (true)
|
||||
; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
|
||||
; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] (4)
|
||||
; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x0)
|
||||
|
||||
; CHECK: 0x0000005a: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (0x0000005f "int")
|
||||
|
||||
; CHECK: 0x0000005f: DW_TAG_base_type
|
||||
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ("int")
|
||||
; CHECK-NEXT: DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
|
||||
; CHECK-NEXT: DW_AT_byte_size [DW_FORM_data1] (0x04)
|
||||
|
||||
; CHECK: 0x00000066: DW_TAG_variable
|
||||
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ("ptr2")
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (0x0000007b "void (*)()")
|
||||
; CHECK-NEXT: DW_AT_external [DW_FORM_flag_present] (true)
|
||||
; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
|
||||
; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] (5)
|
||||
; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x8)
|
||||
|
||||
; CHECK: 0x0000007b: DW_TAG_pointer_type
|
||||
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (0x00000080 "void ()")
|
||||
|
||||
; CHECK: 0x00000080: DW_TAG_subroutine_type
|
||||
; CHECK-NEXT: DW_AT_prototyped [DW_FORM_flag_present] (true)
|
||||
|
||||
; CHECK: 0x00000081: NULL
|
||||
|
||||
target triple = "wasm64-unknown-unknown"
|
||||
|
|
Loading…
Reference in New Issue