mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
DebugInfo: Simplify/tidy/correct global variable decl/def emission handling.
This fixes a bug (introduced by fixing the IR emitted from Clang where the definition of a static member would be scoped within the class, rather than within its lexical decl context) where the definition of a static variable would be placed inside a class. It also improves source fidelity by scoping static class member definitions inside the lexical decl context in which tehy are written (eg: namespace n { class foo { static int i; } int foo::i; } - the definition of 'i' will be within the namespace 'n' in the DWARF output now). Lastly, and the original goal, this reduces debug info size slightly (and makes debug info easier to read, etc) by placing the definitions of non-member global variables within their namespace, rather than using a separate namespace-scoped declaration along with a definition at global scope. Based on patches and discussion with Frédéric. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220497 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b11d9944d9
commit
129ab6c6c5
@ -105,28 +105,23 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
|
|||||||
DIScope GVContext = GV.getContext();
|
DIScope GVContext = GV.getContext();
|
||||||
DIType GTy = DD->resolve(GV.getType());
|
DIType GTy = DD->resolve(GV.getType());
|
||||||
|
|
||||||
// If this is a static data member definition, some attributes belong
|
// Construct the context before querying for the existence of the DIE in
|
||||||
// to the declaration DIE.
|
// case such construction creates the DIE.
|
||||||
DIE *VariableDIE = nullptr;
|
DIE *ContextDIE = getOrCreateContextDIE(GVContext);
|
||||||
bool IsStaticMember = false;
|
|
||||||
DIDerivedType SDMDecl = GV.getStaticDataMemberDeclaration();
|
// Add to map.
|
||||||
if (SDMDecl.Verify()) {
|
DIE *VariableDIE = &createAndAddDIE(GV.getTag(), *ContextDIE, GV);
|
||||||
|
DIScope DeclContext;
|
||||||
|
|
||||||
|
if (DIDerivedType SDMDecl = GV.getStaticDataMemberDeclaration()) {
|
||||||
|
DeclContext = resolve(SDMDecl.getContext());
|
||||||
assert(SDMDecl.isStaticMember() && "Expected static member decl");
|
assert(SDMDecl.isStaticMember() && "Expected static member decl");
|
||||||
|
assert(GV.isDefinition());
|
||||||
// We need the declaration DIE that is in the static member's class.
|
// We need the declaration DIE that is in the static member's class.
|
||||||
VariableDIE = getOrCreateStaticMemberDIE(SDMDecl);
|
DIE *VariableSpecDIE = getOrCreateStaticMemberDIE(SDMDecl);
|
||||||
IsStaticMember = true;
|
addDIEEntry(*VariableDIE, dwarf::DW_AT_specification, *VariableSpecDIE);
|
||||||
}
|
} else {
|
||||||
|
DeclContext = GV.getContext();
|
||||||
// If this is not a static data member definition, create the variable
|
|
||||||
// DIE and add the initial set of attributes to it.
|
|
||||||
if (!VariableDIE) {
|
|
||||||
// Construct the context before querying for the existence of the DIE in
|
|
||||||
// case such construction creates the DIE.
|
|
||||||
DIE *ContextDIE = getOrCreateContextDIE(GVContext);
|
|
||||||
|
|
||||||
// Add to map.
|
|
||||||
VariableDIE = &createAndAddDIE(GV.getTag(), *ContextDIE, GV);
|
|
||||||
|
|
||||||
// Add name and type.
|
// Add name and type.
|
||||||
addString(*VariableDIE, dwarf::DW_AT_name, GV.getDisplayName());
|
addString(*VariableDIE, dwarf::DW_AT_name, GV.getDisplayName());
|
||||||
addType(*VariableDIE, GTy);
|
addType(*VariableDIE, GTy);
|
||||||
@ -139,9 +134,11 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
|
|||||||
addSourceLine(*VariableDIE, GV);
|
addSourceLine(*VariableDIE, GV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!GV.isDefinition())
|
||||||
|
addFlag(*VariableDIE, dwarf::DW_AT_declaration);
|
||||||
|
|
||||||
// Add location.
|
// Add location.
|
||||||
bool addToAccelTable = false;
|
bool addToAccelTable = false;
|
||||||
DIE *VariableSpecDIE = nullptr;
|
|
||||||
bool isGlobalVariable = GV.getGlobal() != nullptr;
|
bool isGlobalVariable = GV.getGlobal() != nullptr;
|
||||||
if (isGlobalVariable) {
|
if (isGlobalVariable) {
|
||||||
addToAccelTable = true;
|
addToAccelTable = true;
|
||||||
@ -172,41 +169,21 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
|
|||||||
DD->addArangeLabel(SymbolCU(this, Sym));
|
DD->addArangeLabel(SymbolCU(this, Sym));
|
||||||
addOpAddress(*Loc, Sym);
|
addOpAddress(*Loc, Sym);
|
||||||
}
|
}
|
||||||
// A static member's declaration is already flagged as such.
|
|
||||||
if (!SDMDecl.Verify() && !GV.isDefinition())
|
addBlock(*VariableDIE, dwarf::DW_AT_location, Loc);
|
||||||
addFlag(*VariableDIE, dwarf::DW_AT_declaration);
|
|
||||||
// Do not create specification DIE if context is either compile unit
|
|
||||||
// or a subprogram.
|
|
||||||
if (GVContext && GV.isDefinition() && !GVContext.isCompileUnit() &&
|
|
||||||
!GVContext.isFile() && !DD->isSubprogramContext(GVContext)) {
|
|
||||||
// Create specification DIE.
|
|
||||||
VariableSpecDIE = &createAndAddDIE(dwarf::DW_TAG_variable, UnitDie);
|
|
||||||
addDIEEntry(*VariableSpecDIE, dwarf::DW_AT_specification, *VariableDIE);
|
|
||||||
addBlock(*VariableSpecDIE, dwarf::DW_AT_location, Loc);
|
|
||||||
// A static member's declaration is already flagged as such.
|
|
||||||
if (!SDMDecl.Verify())
|
|
||||||
addFlag(*VariableDIE, dwarf::DW_AT_declaration);
|
|
||||||
} else {
|
|
||||||
addBlock(*VariableDIE, dwarf::DW_AT_location, Loc);
|
|
||||||
}
|
|
||||||
// Add the linkage name.
|
// Add the linkage name.
|
||||||
StringRef LinkageName = GV.getLinkageName();
|
StringRef LinkageName = GV.getLinkageName();
|
||||||
if (!LinkageName.empty())
|
if (!LinkageName.empty())
|
||||||
// From DWARF4: DIEs to which DW_AT_linkage_name may apply include:
|
// From DWARF4: DIEs to which DW_AT_linkage_name may apply include:
|
||||||
// TAG_common_block, TAG_constant, TAG_entry_point, TAG_subprogram and
|
// TAG_common_block, TAG_constant, TAG_entry_point, TAG_subprogram and
|
||||||
// TAG_variable.
|
// TAG_variable.
|
||||||
addString(IsStaticMember && VariableSpecDIE ? *VariableSpecDIE
|
addString(*VariableDIE,
|
||||||
: *VariableDIE,
|
|
||||||
DD->getDwarfVersion() >= 4 ? dwarf::DW_AT_linkage_name
|
DD->getDwarfVersion() >= 4 ? dwarf::DW_AT_linkage_name
|
||||||
: dwarf::DW_AT_MIPS_linkage_name,
|
: dwarf::DW_AT_MIPS_linkage_name,
|
||||||
GlobalValue::getRealLinkageName(LinkageName));
|
GlobalValue::getRealLinkageName(LinkageName));
|
||||||
} else if (const ConstantInt *CI =
|
} else if (const ConstantInt *CI =
|
||||||
dyn_cast_or_null<ConstantInt>(GV.getConstant())) {
|
dyn_cast_or_null<ConstantInt>(GV.getConstant())) {
|
||||||
// AT_const_value was added when the static member was created. To avoid
|
addConstantValue(*VariableDIE, CI, GTy);
|
||||||
// emitting AT_const_value multiple times, we only add AT_const_value when
|
|
||||||
// it is not a static member.
|
|
||||||
if (!IsStaticMember)
|
|
||||||
addConstantValue(*VariableDIE, CI, GTy);
|
|
||||||
} else if (const ConstantExpr *CE = getMergedGlobalExpr(GV.getConstant())) {
|
} else if (const ConstantExpr *CE = getMergedGlobalExpr(GV.getConstant())) {
|
||||||
addToAccelTable = true;
|
addToAccelTable = true;
|
||||||
// GV is a merged global.
|
// GV is a merged global.
|
||||||
@ -223,19 +200,17 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
|
|||||||
addBlock(*VariableDIE, dwarf::DW_AT_location, Loc);
|
addBlock(*VariableDIE, dwarf::DW_AT_location, Loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
DIE *ResultDIE = VariableSpecDIE ? VariableSpecDIE : VariableDIE;
|
|
||||||
|
|
||||||
if (addToAccelTable) {
|
if (addToAccelTable) {
|
||||||
DD->addAccelName(GV.getName(), *ResultDIE);
|
DD->addAccelName(GV.getName(), *VariableDIE);
|
||||||
|
|
||||||
// If the linkage name is different than the name, go ahead and output
|
// If the linkage name is different than the name, go ahead and output
|
||||||
// that as well into the name table.
|
// that as well into the name table.
|
||||||
if (GV.getLinkageName() != "" && GV.getName() != GV.getLinkageName())
|
if (GV.getLinkageName() != "" && GV.getName() != GV.getLinkageName())
|
||||||
DD->addAccelName(GV.getLinkageName(), *ResultDIE);
|
DD->addAccelName(GV.getLinkageName(), *VariableDIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
addGlobalName(GV.getName(), *ResultDIE, GV.getContext());
|
addGlobalName(GV.getName(), *VariableDIE, DeclContext);
|
||||||
return ResultDIE;
|
return VariableDIE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DwarfCompileUnit::addRange(RangeSpan Range) {
|
void DwarfCompileUnit::addRange(RangeSpan Range) {
|
||||||
|
@ -68,7 +68,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
|
|||||||
!8 = metadata !{metadata !9}
|
!8 = metadata !{metadata !9}
|
||||||
!9 = metadata !{metadata !"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
|
!9 = metadata !{metadata !"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
|
||||||
!10 = metadata !{metadata !12, metadata !27, metadata !28}
|
!10 = metadata !{metadata !12, metadata !27, metadata !28}
|
||||||
!12 = metadata !{metadata !"0x34\00a\00a\00_ZN1C1aE\0014\000\001", metadata !13, metadata !6, metadata !9, i32* @_ZN1C1aE, metadata !15} ; [ DW_TAG_variable ] [a] [line 14] [def]
|
!12 = metadata !{metadata !"0x34\00a\00a\00_ZN1C1aE\0014\000\001", null, metadata !6, metadata !9, i32* @_ZN1C1aE, metadata !15} ; [ DW_TAG_variable ] [a] [line 14] [def]
|
||||||
!13 = metadata !{metadata !"0x2\00C\001\0032\0032\000\000\000", metadata !33, null, null, metadata !14, null, null, null} ; [ DW_TAG_class_type ] [C] [line 1, size 32, align 32, offset 0] [def] [from ]
|
!13 = metadata !{metadata !"0x2\00C\001\0032\0032\000\000\000", metadata !33, null, null, metadata !14, null, null, null} ; [ DW_TAG_class_type ] [C] [line 1, size 32, align 32, offset 0] [def] [from ]
|
||||||
!14 = metadata !{metadata !15, metadata !16, metadata !19, metadata !20, metadata !23, metadata !24, metadata !26}
|
!14 = metadata !{metadata !15, metadata !16, metadata !19, metadata !20, metadata !23, metadata !24, metadata !26}
|
||||||
!15 = metadata !{metadata !"0xd\00a\003\000\000\000\004097", metadata !33, metadata !13, metadata !9, null} ; [ DW_TAG_member ] [a] [line 3, size 0, align 0, offset 0] [private] [static] [from int]
|
!15 = metadata !{metadata !"0xd\00a\003\000\000\000\004097", metadata !33, metadata !13, metadata !9, null} ; [ DW_TAG_member ] [a] [line 3, size 0, align 0, offset 0] [private] [static] [from int]
|
||||||
@ -83,8 +83,8 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
|
|||||||
!24 = metadata !{metadata !"0xd\00const_c\0010\000\000\000\004099", metadata !33, metadata !13, metadata !25, i32 18} ; [ DW_TAG_member ] [const_c] [line 10, size 0, align 0, offset 0] [static] [from ]
|
!24 = metadata !{metadata !"0xd\00const_c\0010\000\000\000\004099", metadata !33, metadata !13, metadata !25, i32 18} ; [ DW_TAG_member ] [const_c] [line 10, size 0, align 0, offset 0] [static] [from ]
|
||||||
!25 = metadata !{metadata !"0x26\00\000\000\000\000\000", null, null, metadata !9} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from int]
|
!25 = metadata !{metadata !"0x26\00\000\000\000\000\000", null, null, metadata !9} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from int]
|
||||||
!26 = metadata !{metadata !"0xd\00d\0011\0032\0032\000\003", metadata !33, metadata !13, metadata !9} ; [ DW_TAG_member ] [d] [line 11, size 32, align 32, offset 0] [from int]
|
!26 = metadata !{metadata !"0xd\00d\0011\0032\0032\000\003", metadata !33, metadata !13, metadata !9} ; [ DW_TAG_member ] [d] [line 11, size 32, align 32, offset 0] [from int]
|
||||||
!27 = metadata !{metadata !"0x34\00b\00b\00_ZN1C1bE\0015\000\001", metadata !13, metadata !6, metadata !9, i32* @_ZN1C1bE, metadata !19} ; [ DW_TAG_variable ] [b] [line 15] [def]
|
!27 = metadata !{metadata !"0x34\00b\00b\00_ZN1C1bE\0015\000\001", null, metadata !6, metadata !9, i32* @_ZN1C1bE, metadata !19} ; [ DW_TAG_variable ] [b] [line 15] [def]
|
||||||
!28 = metadata !{metadata !"0x34\00c\00c\00_ZN1C1cE\0016\000\001", metadata !13, metadata !6, metadata !9, i32* @_ZN1C1cE, metadata !23} ; [ DW_TAG_variable ] [c] [line 16] [def]
|
!28 = metadata !{metadata !"0x34\00c\00c\00_ZN1C1cE\0016\000\001", null, metadata !6, metadata !9, i32* @_ZN1C1cE, metadata !23} ; [ DW_TAG_variable ] [c] [line 16] [def]
|
||||||
!29 = metadata !{metadata !"0x100\00instance_C\0020\000", metadata !5, metadata !6, metadata !13} ; [ DW_TAG_auto_variable ] [instance_C] [line 20]
|
!29 = metadata !{metadata !"0x100\00instance_C\0020\000", metadata !5, metadata !6, metadata !13} ; [ DW_TAG_auto_variable ] [instance_C] [line 20]
|
||||||
!30 = metadata !{i32 20, i32 0, metadata !5, null}
|
!30 = metadata !{i32 20, i32 0, metadata !5, null}
|
||||||
!31 = metadata !{i32 21, i32 0, metadata !5, null}
|
!31 = metadata !{i32 21, i32 0, metadata !5, null}
|
||||||
@ -95,6 +95,10 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
|
|||||||
; (for variables) or DW_AT_const_value (for constants).
|
; (for variables) or DW_AT_const_value (for constants).
|
||||||
;
|
;
|
||||||
; PRESENT: .debug_info contents:
|
; PRESENT: .debug_info contents:
|
||||||
|
; PRESENT: DW_TAG_variable
|
||||||
|
; PRESENT-NEXT: DW_AT_specification {{.*}} "a"
|
||||||
|
; PRESENT-NEXT: DW_AT_location
|
||||||
|
; PRESENT-NEXT: DW_AT_linkage_name {{.*}} "_ZN1C1aE"
|
||||||
; PRESENT: DW_TAG_class_type
|
; PRESENT: DW_TAG_class_type
|
||||||
; PRESENT-NEXT: DW_AT_name {{.*}} "C"
|
; PRESENT-NEXT: DW_AT_name {{.*}} "C"
|
||||||
; PRESENT: DW_TAG_member
|
; PRESENT: DW_TAG_member
|
||||||
@ -131,10 +135,6 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
|
|||||||
; PRESENT: NULL
|
; PRESENT: NULL
|
||||||
; Definitions point back to their declarations, and have a location.
|
; Definitions point back to their declarations, and have a location.
|
||||||
; PRESENT: DW_TAG_variable
|
; PRESENT: DW_TAG_variable
|
||||||
; PRESENT-NEXT: DW_AT_specification {{.*}} "a"
|
|
||||||
; PRESENT-NEXT: DW_AT_location
|
|
||||||
; PRESENT-NEXT: DW_AT_linkage_name {{.*}} "_ZN1C1aE"
|
|
||||||
; PRESENT: DW_TAG_variable
|
|
||||||
; PRESENT-NEXT: DW_AT_specification {{.*}} "b"
|
; PRESENT-NEXT: DW_AT_specification {{.*}} "b"
|
||||||
; PRESENT-NEXT: DW_AT_location
|
; PRESENT-NEXT: DW_AT_location
|
||||||
; PRESENT-NEXT: DW_AT_linkage_name {{.*}} "_ZN1C1bE"
|
; PRESENT-NEXT: DW_AT_linkage_name {{.*}} "_ZN1C1bE"
|
||||||
@ -145,6 +145,10 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
|
|||||||
|
|
||||||
; For Darwin gdb:
|
; For Darwin gdb:
|
||||||
; DARWINP: .debug_info contents:
|
; DARWINP: .debug_info contents:
|
||||||
|
; DARWINP: DW_TAG_variable
|
||||||
|
; DARWINP-NEXT: DW_AT_specification {{.*}} "a"
|
||||||
|
; DARWINP-NEXT: DW_AT_location
|
||||||
|
; DARWINP-NEXT: DW_AT_linkage_name {{.*}} "_ZN1C1aE"
|
||||||
; DARWINP: DW_TAG_class_type
|
; DARWINP: DW_TAG_class_type
|
||||||
; DARWINP-NEXT: DW_AT_name {{.*}} "C"
|
; DARWINP-NEXT: DW_AT_name {{.*}} "C"
|
||||||
; DARWINP: DW_TAG_member
|
; DARWINP: DW_TAG_member
|
||||||
@ -181,10 +185,6 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
|
|||||||
; DARWINP: NULL
|
; DARWINP: NULL
|
||||||
; Definitions point back to their declarations, and have a location.
|
; Definitions point back to their declarations, and have a location.
|
||||||
; DARWINP: DW_TAG_variable
|
; DARWINP: DW_TAG_variable
|
||||||
; DARWINP-NEXT: DW_AT_specification {{.*}} "a"
|
|
||||||
; DARWINP-NEXT: DW_AT_location
|
|
||||||
; DARWINP-NEXT: DW_AT_linkage_name {{.*}} "_ZN1C1aE"
|
|
||||||
; DARWINP: DW_TAG_variable
|
|
||||||
; DARWINP-NEXT: DW_AT_specification {{.*}} "b"
|
; DARWINP-NEXT: DW_AT_specification {{.*}} "b"
|
||||||
; DARWINP-NEXT: DW_AT_location
|
; DARWINP-NEXT: DW_AT_location
|
||||||
; DARWINP-NEXT: DW_AT_linkage_name {{.*}} "_ZN1C1bE"
|
; DARWINP-NEXT: DW_AT_linkage_name {{.*}} "_ZN1C1bE"
|
||||||
|
@ -49,6 +49,9 @@
|
|||||||
; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true)
|
; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true)
|
||||||
; CHECK-NOT: DW_AT_GNU_pubtypes [
|
; CHECK-NOT: DW_AT_GNU_pubtypes [
|
||||||
|
|
||||||
|
; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||||
|
; CHECK-NEXT: DW_AT_specification {{.*}} "static_member_variable"
|
||||||
|
|
||||||
; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type
|
; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type
|
||||||
; CHECK-NEXT: DW_AT_name {{.*}} "C"
|
; CHECK-NEXT: DW_AT_name {{.*}} "C"
|
||||||
|
|
||||||
@ -66,20 +69,23 @@
|
|||||||
; CHECK: [[INT:0x[0-9a-f]+]]: DW_TAG_base_type
|
; CHECK: [[INT:0x[0-9a-f]+]]: DW_TAG_base_type
|
||||||
; CHECK-NEXT: DW_AT_name {{.*}} "int"
|
; CHECK-NEXT: DW_AT_name {{.*}} "int"
|
||||||
|
|
||||||
; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
|
||||||
; CHECK-NEXT: DW_AT_specification {{.*}} "static_member_variable"
|
|
||||||
|
|
||||||
; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||||
; CHECK-NEXT: DW_AT_name {{.*}} "global_variable"
|
; CHECK-NEXT: DW_AT_name {{.*}} "global_variable"
|
||||||
|
|
||||||
; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace
|
; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace
|
||||||
; CHECK-NEXT: DW_AT_name {{.*}} "ns"
|
; CHECK-NEXT: DW_AT_name {{.*}} "ns"
|
||||||
|
|
||||||
; CHECK: DW_TAG_variable
|
; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||||
; CHECK-NEXT: DW_AT_name {{.*}} "global_namespace_variable"
|
; CHECK-NEXT: DW_AT_name {{.*}} "global_namespace_variable"
|
||||||
|
; CHECK-NOT: DW_AT_specification
|
||||||
|
; CHECK: DW_AT_location
|
||||||
|
; CHECK-NOT: DW_AT_specification
|
||||||
|
|
||||||
; CHECK: DW_TAG_variable
|
; CHECK: [[D_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
||||||
; CHECK-NEXT: DW_AT_name {{.*}} "d"
|
; CHECK-NEXT: DW_AT_name {{.*}} "d"
|
||||||
|
; CHECK-NOT: DW_AT_specification
|
||||||
|
; CHECK: DW_AT_location
|
||||||
|
; CHECK-NOT: DW_AT_specification
|
||||||
|
|
||||||
; CHECK: [[D:0x[0-9a-f]+]]: DW_TAG_structure_type
|
; CHECK: [[D:0x[0-9a-f]+]]: DW_TAG_structure_type
|
||||||
; CHECK-NEXT: DW_AT_name {{.*}} "D"
|
; CHECK-NEXT: DW_AT_name {{.*}} "D"
|
||||||
@ -90,12 +96,6 @@
|
|||||||
; CHECK-NOT: DW_TAG
|
; CHECK-NOT: DW_TAG
|
||||||
; CHECK: DW_AT_name {{.*}} "global_namespace_function"
|
; CHECK: DW_AT_name {{.*}} "global_namespace_function"
|
||||||
|
|
||||||
; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
|
||||||
; CHECK-NEXT: DW_AT_specification {{.*}} "_ZN2ns25global_namespace_variableE"
|
|
||||||
|
|
||||||
; CHECK: [[D_VAR:0x[0-9a-f]+]]: DW_TAG_variable
|
|
||||||
; CHECK-NEXT: DW_AT_specification {{.*}} "_ZN2ns1dE"
|
|
||||||
|
|
||||||
; CHECK: DW_TAG_subprogram
|
; CHECK: DW_TAG_subprogram
|
||||||
; CHECK-NOT: DW_TAG
|
; CHECK-NOT: DW_TAG
|
||||||
; CHECK: DW_AT_name {{.*}} "f3"
|
; CHECK: DW_AT_name {{.*}} "f3"
|
||||||
@ -116,7 +116,7 @@
|
|||||||
; CHECK: [[OUTER_ANON:.*]]: DW_TAG_namespace
|
; CHECK: [[OUTER_ANON:.*]]: DW_TAG_namespace
|
||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
; CHECK-NOT: DW_AT_name
|
; CHECK-NOT: DW_AT_name
|
||||||
; CHECK: DW_TAG_variable
|
; CHECK: [[OUTER_ANON_C:.*]]: DW_TAG_variable
|
||||||
; CHECK-NOT: DW_TAG
|
; CHECK-NOT: DW_TAG
|
||||||
; CHECK: DW_AT_name {{.*}} "c"
|
; CHECK: DW_AT_name {{.*}} "c"
|
||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
@ -129,9 +129,6 @@
|
|||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
; CHECK: NULL
|
; CHECK: NULL
|
||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
; CHECK: [[OUTER_ANON_C:.*]]: DW_TAG_variable
|
|
||||||
; CHECK-NOT: DW_TAG
|
|
||||||
; CHECK-NEXT: DW_AT_specification {{.*}} "_ZN5outer12_GLOBAL__N_11cE"
|
|
||||||
|
|
||||||
; CHECK: [[ANON:.*]]: DW_TAG_namespace
|
; CHECK: [[ANON:.*]]: DW_TAG_namespace
|
||||||
; CHECK-NOT: DW_AT_name
|
; CHECK-NOT: DW_AT_name
|
||||||
@ -139,24 +136,18 @@
|
|||||||
; CHECK-NOT: DW_TAG
|
; CHECK-NOT: DW_TAG
|
||||||
; CHECK: DW_AT_name {{.*}} "inner"
|
; CHECK: DW_AT_name {{.*}} "inner"
|
||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
; CHECK: DW_TAG_variable
|
; CHECK: [[ANON_INNER_B:.*]]: DW_TAG_variable
|
||||||
; CHECK-NOT: DW_TAG
|
; CHECK-NOT: DW_TAG
|
||||||
; CHECK: DW_AT_name {{.*}} "b"
|
; CHECK: DW_AT_name {{.*}} "b"
|
||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
; CHECK: NULL
|
; CHECK: NULL
|
||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
; CHECK: DW_TAG_variable
|
; CHECK: [[ANON_I:.*]]: DW_TAG_variable
|
||||||
; CHECK-NOT: DW_TAG
|
; CHECK-NOT: DW_TAG
|
||||||
; CHECK: DW_AT_name {{.*}} "i"
|
; CHECK: DW_AT_name {{.*}} "i"
|
||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
; CHECK: NULL
|
; CHECK: NULL
|
||||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||||
; CHECK: [[ANON_INNER_B:.*]]: DW_TAG_variable
|
|
||||||
; CHECK-NOT: DW_TAG
|
|
||||||
; CHECK-NEXT: DW_AT_specification {{.*}} "_ZN12_GLOBAL__N_15inner1bE"
|
|
||||||
; CHECK: [[ANON_I:.*]]: DW_TAG_variable
|
|
||||||
; CHECK-NOT: DW_TAG
|
|
||||||
; CHECK-NEXT: DW_AT_specification {{.*}} "_ZN12_GLOBAL__N_11iE"
|
|
||||||
|
|
||||||
; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
|
||||||
; CHECK-NOT: DW_TAG
|
; CHECK-NOT: DW_TAG
|
||||||
@ -312,7 +303,7 @@ attributes #1 = { nounwind readnone }
|
|||||||
!30 = metadata !{metadata !"0xf\00\000\0064\0064\000\000", null, null, metadata !7} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from int]
|
!30 = metadata !{metadata !"0xf\00\000\0064\0064\000\000", null, null, metadata !7} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from int]
|
||||||
!31 = metadata !{metadata !"0x2e\00f7\00f7\00_Z2f7v\0054\000\001\000\006\00256\000\0054", metadata !1, metadata !23, metadata !13, null, i32 ()* @_Z2f7v, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 54] [def] [f7]
|
!31 = metadata !{metadata !"0x2e\00f7\00f7\00_Z2f7v\0054\000\001\000\006\00256\000\0054", metadata !1, metadata !23, metadata !13, null, i32 ()* @_Z2f7v, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 54] [def] [f7]
|
||||||
!32 = metadata !{metadata !33, metadata !34, metadata !35, metadata !36, metadata !37, metadata !38, metadata !41, metadata !44}
|
!32 = metadata !{metadata !33, metadata !34, metadata !35, metadata !36, metadata !37, metadata !38, metadata !41, metadata !44}
|
||||||
!33 = metadata !{metadata !"0x34\00static_member_variable\00static_member_variable\00_ZN1C22static_member_variableE\007\000\001", metadata !4, metadata !23, metadata !7, i32* @_ZN1C22static_member_variableE, metadata !6} ; [ DW_TAG_variable ] [static_member_variable] [line 7] [def]
|
!33 = metadata !{metadata !"0x34\00static_member_variable\00static_member_variable\00_ZN1C22static_member_variableE\007\000\001", null, metadata !23, metadata !7, i32* @_ZN1C22static_member_variableE, metadata !6} ; [ DW_TAG_variable ] [static_member_variable] [line 7] [def]
|
||||||
!34 = metadata !{metadata !"0x34\00global_variable\00global_variable\00\0017\000\001", null, metadata !23, metadata !"_ZTS1C", %struct.C* @global_variable, null} ; [ DW_TAG_variable ] [global_variable] [line 17] [def]
|
!34 = metadata !{metadata !"0x34\00global_variable\00global_variable\00\0017\000\001", null, metadata !23, metadata !"_ZTS1C", %struct.C* @global_variable, null} ; [ DW_TAG_variable ] [global_variable] [line 17] [def]
|
||||||
!35 = metadata !{metadata !"0x34\00global_namespace_variable\00global_namespace_variable\00_ZN2ns25global_namespace_variableE\0027\000\001", metadata !16, metadata !23, metadata !7, i32* @_ZN2ns25global_namespace_variableE, null} ; [ DW_TAG_variable ] [global_namespace_variable] [line 27] [def]
|
!35 = metadata !{metadata !"0x34\00global_namespace_variable\00global_namespace_variable\00_ZN2ns25global_namespace_variableE\0027\000\001", metadata !16, metadata !23, metadata !7, i32* @_ZN2ns25global_namespace_variableE, null} ; [ DW_TAG_variable ] [global_namespace_variable] [line 27] [def]
|
||||||
!36 = metadata !{metadata !"0x34\00d\00d\00_ZN2ns1dE\0030\000\001", metadata !16, metadata !23, metadata !"_ZTSN2ns1DE", %"struct.ns::D"* @_ZN2ns1dE, null} ; [ DW_TAG_variable ] [d] [line 30] [def]
|
!36 = metadata !{metadata !"0x34\00d\00d\00_ZN2ns1dE\0030\000\001", metadata !16, metadata !23, metadata !"_ZTSN2ns1DE", %"struct.ns::D"* @_ZN2ns1dE, null} ; [ DW_TAG_variable ] [d] [line 30] [def]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user