Skip to content

Commit 79d3132

Browse files
committed
[DwarfDebug] Move emission of global vars, types and imports to endModule()
This patch proposes to move emission of global variables, types, imported entities, etc from DwarfDebug::beginModule() to DwarfDebug::endModule(). Effectively, this changes nothing but the order of debug entities which will be as follows: * subprograms (including related context, local variables/labels, local imported entities; related types can be created as a part of the emission of local entities of an abstract subprogram); * global variables (including related context and types); * retained types and enums; * non-local-scoped imported entities; * basic types; * other types left (as a part of local variables attributes emission). Note that the order of emitted compile units may also be changed as now we emit units that contain subprograms first and then all other non-empty units. The motivation behind this change is the following: (1) DwarfDebug::beginModule() is run at the very beginning of backend's pipeline, from this time IR can be significantly changed by target-specific passes. If it happens for debug metadata of global entities, those changes will not be reflected in the emitted DWARF. (2) imported subprogram names should refer to an abstract subprogram if it exists, but it isn't known in DwarfDebug::beginModule() (it's possible to make some guesses based on location info, but it's not quite reliable); (3) aforementioned entities if they are scoped within a bracketed block (subject of D113741) couldn't be emitted in DwarfDebug::beginModule() (they need parent emitted first). Another problem is if to try to gather some information about local entities and defer their emission (till subprogram's processing or DwarfDebug::endModule()) all the gathered details might be irrelevant / invalid by the time the entities are being emitted (because of (1)). Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D114705
1 parent fd26417 commit 79d3132

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+6984
-6970
lines changed

lld/test/wasm/debuginfo.test

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,23 @@ CHECK-NEXT: DW_AT_producer ("clang version 7.0.0 (trunk {{.*}})")
4444
CHECK-NEXT: DW_AT_language (DW_LANG_C99)
4545
CHECK-NEXT: DW_AT_name ("hi_foo.c")
4646

47+
CHECK: DW_TAG_subprogram
48+
CHECK-NEXT: DW_AT_low_pc
49+
CHECK-NEXT: DW_AT_high_pc
50+
CHECK-NEXT: DW_AT_frame_base
51+
CHECK-NEXT: DW_AT_name ("foo")
52+
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
53+
CHECK-NEXT: DW_AT_decl_line (3)
54+
55+
CHECK: DW_TAG_formal_parameter
56+
CHECK-NEXT: DW_AT_location (DW_OP_WASM_location 0x0 0x0, DW_OP_stack_value)
57+
CHECK-NEXT: DW_AT_name ("p")
58+
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
59+
CHECK-NEXT: DW_AT_decl_line (3)
60+
4761
CHECK: DW_TAG_variable
4862
CHECK-NEXT: DW_AT_name ("y")
49-
CHECK-NEXT: DW_AT_type (0x000000ac "int[2]")
63+
CHECK-NEXT: DW_AT_type (0x000000d4 "int[2]")
5064
CHECK-NEXT: DW_AT_external (true)
5165
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
5266
CHECK-NEXT: DW_AT_decl_line (1)
@@ -68,23 +82,9 @@ CHECK-NEXT: DW_AT_encoding (DW_ATE_unsigned)
6882

6983
CHECK: DW_TAG_variable
7084
CHECK-NEXT: DW_AT_name ("z")
71-
CHECK-NEXT: DW_AT_type (0x000000ac "int[2]")
85+
CHECK-NEXT: DW_AT_type (0x000000d4 "int[2]")
7286
CHECK-NEXT: DW_AT_external (true)
7387
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
7488
CHECK-NEXT: DW_AT_decl_line (8)
7589
CHECK-NEXT: DW_AT_location (DW_OP_addr 0xffffffff)
7690

77-
CHECK: DW_TAG_subprogram
78-
CHECK-NEXT: DW_AT_low_pc
79-
CHECK-NEXT: DW_AT_high_pc
80-
CHECK-NEXT: DW_AT_frame_base
81-
CHECK-NEXT: DW_AT_name ("foo")
82-
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
83-
CHECK-NEXT: DW_AT_decl_line (3)
84-
85-
CHECK: DW_TAG_formal_parameter
86-
CHECK-NEXT: DW_AT_location (DW_OP_WASM_location 0x0 0x0, DW_OP_stack_value)
87-
CHECK-NEXT: DW_AT_name ("p")
88-
CHECK-NEXT: DW_AT_decl_file ("{{.*}}hi_foo.c")
89-
CHECK-NEXT: DW_AT_decl_line (3)
90-

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 89 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,33 +1114,6 @@ void DwarfDebug::constructAndAddImportedEntityDIE(DwarfCompileUnit &TheCU,
11141114
D->addChild(TheCU.constructImportedEntityDIE(N));
11151115
}
11161116

1117-
/// Sort and unique GVEs by comparing their fragment offset.
1118-
static SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &
1119-
sortGlobalExprs(SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &GVEs) {
1120-
llvm::sort(
1121-
GVEs, [](DwarfCompileUnit::GlobalExpr A, DwarfCompileUnit::GlobalExpr B) {
1122-
// Sort order: first null exprs, then exprs without fragment
1123-
// info, then sort by fragment offset in bits.
1124-
// FIXME: Come up with a more comprehensive comparator so
1125-
// the sorting isn't non-deterministic, and so the following
1126-
// std::unique call works correctly.
1127-
if (!A.Expr || !B.Expr)
1128-
return !!B.Expr;
1129-
auto FragmentA = A.Expr->getFragmentInfo();
1130-
auto FragmentB = B.Expr->getFragmentInfo();
1131-
if (!FragmentA || !FragmentB)
1132-
return !!FragmentB;
1133-
return FragmentA->OffsetInBits < FragmentB->OffsetInBits;
1134-
});
1135-
GVEs.erase(std::unique(GVEs.begin(), GVEs.end(),
1136-
[](DwarfCompileUnit::GlobalExpr A,
1137-
DwarfCompileUnit::GlobalExpr B) {
1138-
return A.Expr == B.Expr;
1139-
}),
1140-
GVEs.end());
1141-
return GVEs;
1142-
}
1143-
11441117
// Emit all Dwarf sections that should come prior to the content. Create
11451118
// global DIEs and emit initial debug info sections. This is invoked by
11461119
// the target AsmPrinter.
@@ -1156,14 +1129,6 @@ void DwarfDebug::beginModule(Module *M) {
11561129
assert(MMI->hasDebugInfo() &&
11571130
"DebugInfoAvailabilty unexpectedly not initialized");
11581131
SingleCU = NumDebugCUs == 1;
1159-
DenseMap<DIGlobalVariable *, SmallVector<DwarfCompileUnit::GlobalExpr, 1>>
1160-
GVMap;
1161-
for (const GlobalVariable &Global : M->globals()) {
1162-
SmallVector<DIGlobalVariableExpression *, 1> GVs;
1163-
Global.getDebugInfo(GVs);
1164-
for (auto *GVE : GVs)
1165-
GVMap[GVE->getVariable()].push_back({&Global, GVE->getExpression()});
1166-
}
11671132

11681133
// Create the symbol that designates the start of the unit's contribution
11691134
// to the string offsets table. In a split DWARF scenario, only the skeleton
@@ -1189,58 +1154,6 @@ void DwarfDebug::beginModule(Module *M) {
11891154
// address table (.debug_addr) header.
11901155
AddrPool.setLabel(Asm->createTempSymbol("addr_table_base"));
11911156
DebugLocs.setSym(Asm->createTempSymbol("loclists_table_base"));
1192-
1193-
for (DICompileUnit *CUNode : M->debug_compile_units()) {
1194-
// FIXME: Move local imported entities into a list attached to the
1195-
// subprogram, then this search won't be needed and a
1196-
// getImportedEntities().empty() test should go below with the rest.
1197-
bool HasNonLocalImportedEntities = llvm::any_of(
1198-
CUNode->getImportedEntities(), [](const DIImportedEntity *IE) {
1199-
return !isa<DILocalScope>(IE->getScope());
1200-
});
1201-
1202-
if (!HasNonLocalImportedEntities && CUNode->getEnumTypes().empty() &&
1203-
CUNode->getRetainedTypes().empty() &&
1204-
CUNode->getGlobalVariables().empty() && CUNode->getMacros().empty())
1205-
continue;
1206-
1207-
DwarfCompileUnit &CU = getOrCreateDwarfCompileUnit(CUNode);
1208-
1209-
// Global Variables.
1210-
for (auto *GVE : CUNode->getGlobalVariables()) {
1211-
// Don't bother adding DIGlobalVariableExpressions listed in the CU if we
1212-
// already know about the variable and it isn't adding a constant
1213-
// expression.
1214-
auto &GVMapEntry = GVMap[GVE->getVariable()];
1215-
auto *Expr = GVE->getExpression();
1216-
if (!GVMapEntry.size() || (Expr && Expr->isConstant()))
1217-
GVMapEntry.push_back({nullptr, Expr});
1218-
}
1219-
1220-
DenseSet<DIGlobalVariable *> Processed;
1221-
for (auto *GVE : CUNode->getGlobalVariables()) {
1222-
DIGlobalVariable *GV = GVE->getVariable();
1223-
if (Processed.insert(GV).second)
1224-
CU.getOrCreateGlobalVariableDIE(GV, sortGlobalExprs(GVMap[GV]));
1225-
}
1226-
1227-
for (auto *Ty : CUNode->getEnumTypes()) {
1228-
// The enum types array by design contains pointers to
1229-
// MDNodes rather than DIRefs. Unique them here.
1230-
CU.getOrCreateTypeDIE(cast<DIType>(Ty));
1231-
}
1232-
for (auto *Ty : CUNode->getRetainedTypes()) {
1233-
// The retained types array by design contains pointers to
1234-
// MDNodes rather than DIRefs. Unique them here.
1235-
if (DIType *RT = dyn_cast<DIType>(Ty))
1236-
// There is no point in force-emitting a forward declaration.
1237-
CU.getOrCreateTypeDIE(RT);
1238-
}
1239-
// Emit imported_modules last so that the relevant context is already
1240-
// available.
1241-
for (auto *IE : CUNode->getImportedEntities())
1242-
constructAndAddImportedEntityDIE(CU, IE);
1243-
}
12441157
}
12451158

12461159
void DwarfDebug::finishEntityDefinitions() {
@@ -1405,6 +1318,33 @@ void DwarfDebug::finalizeModuleInfo() {
14051318
SkeletonHolder.computeSizeAndOffsets();
14061319
}
14071320

1321+
/// Sort and unique GVEs by comparing their fragment offset.
1322+
static SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &
1323+
sortGlobalExprs(SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &GVEs) {
1324+
llvm::sort(
1325+
GVEs, [](DwarfCompileUnit::GlobalExpr A, DwarfCompileUnit::GlobalExpr B) {
1326+
// Sort order: first null exprs, then exprs without fragment
1327+
// info, then sort by fragment offset in bits.
1328+
// FIXME: Come up with a more comprehensive comparator so
1329+
// the sorting isn't non-deterministic, and so the following
1330+
// std::unique call works correctly.
1331+
if (!A.Expr || !B.Expr)
1332+
return !!B.Expr;
1333+
auto FragmentA = A.Expr->getFragmentInfo();
1334+
auto FragmentB = B.Expr->getFragmentInfo();
1335+
if (!FragmentA || !FragmentB)
1336+
return !!FragmentB;
1337+
return FragmentA->OffsetInBits < FragmentB->OffsetInBits;
1338+
});
1339+
GVEs.erase(std::unique(GVEs.begin(), GVEs.end(),
1340+
[](DwarfCompileUnit::GlobalExpr A,
1341+
DwarfCompileUnit::GlobalExpr B) {
1342+
return A.Expr == B.Expr;
1343+
}),
1344+
GVEs.end());
1345+
return GVEs;
1346+
}
1347+
14081348
// Emit all Dwarf sections that should come after the content.
14091349
void DwarfDebug::endModule() {
14101350
// Terminate the pending line table.
@@ -1414,9 +1354,68 @@ void DwarfDebug::endModule() {
14141354
assert(CurFn == nullptr);
14151355
assert(CurMI == nullptr);
14161356

1417-
for (const auto &P : CUMap) {
1418-
auto &CU = *P.second;
1419-
CU.createBaseTypeDIEs();
1357+
DenseMap<DIGlobalVariable *, SmallVector<DwarfCompileUnit::GlobalExpr, 1>>
1358+
GVMap;
1359+
for (const GlobalVariable &Global : MMI->getModule()->globals()) {
1360+
SmallVector<DIGlobalVariableExpression *, 1> GVs;
1361+
Global.getDebugInfo(GVs);
1362+
for (auto *GVE : GVs)
1363+
GVMap[GVE->getVariable()].push_back({&Global, GVE->getExpression()});
1364+
}
1365+
1366+
for (DICompileUnit *CUNode : MMI->getModule()->debug_compile_units()) {
1367+
auto *CU = CUMap.lookup(CUNode);
1368+
1369+
// If this CU hasn't been emitted yet, create it here unless it is empty.
1370+
if (!CU) {
1371+
// FIXME: Move local imported entities into a list attached to the
1372+
// subprogram, then this search won't be needed and a
1373+
// getImportedEntities().empty() test should go below with the rest.
1374+
bool HasNonLocalImportedEntities = llvm::any_of(
1375+
CUNode->getImportedEntities(), [](const DIImportedEntity *IE) {
1376+
return !isa<DILocalScope>(IE->getScope());
1377+
});
1378+
1379+
if (!HasNonLocalImportedEntities && CUNode->getEnumTypes().empty() &&
1380+
CUNode->getRetainedTypes().empty() &&
1381+
CUNode->getGlobalVariables().empty() && CUNode->getMacros().empty())
1382+
continue;
1383+
1384+
CU = &getOrCreateDwarfCompileUnit(CUNode);
1385+
}
1386+
1387+
// Global Variables.
1388+
for (auto *GVE : CUNode->getGlobalVariables()) {
1389+
// Don't bother adding DIGlobalVariableExpressions listed in the CU if we
1390+
// already know about the variable and it isn't adding a constant
1391+
// expression.
1392+
auto &GVMapEntry = GVMap[GVE->getVariable()];
1393+
auto *Expr = GVE->getExpression();
1394+
if (!GVMapEntry.size() || (Expr && Expr->isConstant()))
1395+
GVMapEntry.push_back({nullptr, Expr});
1396+
}
1397+
1398+
DenseSet<DIGlobalVariable *> Processed;
1399+
for (auto *GVE : CUNode->getGlobalVariables()) {
1400+
DIGlobalVariable *GV = GVE->getVariable();
1401+
if (Processed.insert(GV).second)
1402+
CU->getOrCreateGlobalVariableDIE(GV, sortGlobalExprs(GVMap[GV]));
1403+
}
1404+
1405+
for (auto *Ty : CUNode->getEnumTypes())
1406+
CU->getOrCreateTypeDIE(cast<DIType>(Ty));
1407+
1408+
for (auto *Ty : CUNode->getRetainedTypes())
1409+
if (DIType *RT = dyn_cast<DIType>(Ty))
1410+
// There is no point in force-emitting a forward declaration.
1411+
CU->getOrCreateTypeDIE(RT);
1412+
1413+
// Emit imported entities last so that the relevant context
1414+
// is already available.
1415+
for (auto *IE : CUNode->getImportedEntities())
1416+
constructAndAddImportedEntityDIE(*CU, IE);
1417+
1418+
CU->createBaseTypeDIEs();
14201419
}
14211420

14221421
// If we aren't actually generating debug info (check beginModule -

llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ target triple = "thumbv7-apple-darwin10"
1010
@x4 = internal global i8 1, align 1, !dbg !8
1111
@x5 = global i8 1, align 1, !dbg !10
1212

13-
; CHECK: DW_TAG_variable
13+
; CHECK: DW_TAG_variable [6]
1414
; CHECK-NOT: DW_TAG
1515
; CHECK: DW_AT_name {{.*}} "x1"
1616
; CHECK-NOT: {{DW_TAG|NULL}}
1717
; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr [[ADDR:0x[0-9a-fA-F]+]])
18-
; CHECK: DW_TAG_variable
18+
; CHECK: DW_TAG_variable [6]
1919
; CHECK-NOT: DW_TAG
2020
; CHECK: DW_AT_name {{.*}} "x2"
2121
; CHECK-NOT: {{DW_TAG|NULL}}

llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
; RUN: llc -arm-global-merge -global-merge-group-by-use=false -filetype=obj < %s | llvm-dwarfdump -debug-info -v - | FileCheck %s
22

3-
; CHECK: DW_TAG_variable
3+
; CHECK: DW_TAG_variable [6]
44
; CHECK-NOT: DW_TAG
55
; CHECK: DW_AT_name {{.*}} "x1"
66
; CHECK-NOT: {{DW_TAG|NULL}}
77
; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr [[ADDR:0x[0-9a-fA-F]+]])
8-
; CHECK: DW_TAG_variable
8+
; CHECK: DW_TAG_variable [6]
99
; CHECK-NOT: DW_TAG
1010
; CHECK: DW_AT_name {{.*}} "x2"
1111
; CHECK-NOT: {{DW_TAG|NULL}}

llvm/test/DebugInfo/AMDGPU/variable-locations.ll

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,7 @@
1313

1414
declare void @llvm.dbg.declare(metadata, metadata, metadata)
1515

16-
; CHECK: {{.*}}DW_TAG_variable
17-
; CHECK-NEXT: DW_AT_name {{.*}}"GlobA"
18-
; CHECK-NEXT: DW_AT_type
19-
; CHECK-NEXT: DW_AT_external
20-
; CHECK-NEXT: DW_AT_decl_file
21-
; CHECK-NEXT: DW_AT_decl_line
22-
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
2316
@GlobA = common addrspace(1) global i32 0, align 4, !dbg !0
24-
25-
; CHECK: {{.*}}DW_TAG_variable
26-
; CHECK-NEXT: DW_AT_name {{.*}}"GlobB"
27-
; CHECK-NEXT: DW_AT_type
28-
; CHECK-NEXT: DW_AT_external
29-
; CHECK-NEXT: DW_AT_decl_file
30-
; CHECK-NEXT: DW_AT_decl_line
31-
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
3217
@GlobB = common addrspace(1) global i32 0, align 4, !dbg !6
3318

3419
; CHECK: {{.*}}DW_TAG_subprogram
@@ -78,12 +63,28 @@ entry:
7863
!llvm.ident = !{!12}
7964

8065
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
66+
67+
; CHECK: {{.*}}DW_TAG_variable
68+
; CHECK-NEXT: DW_AT_name {{.*}}"GlobA"
69+
; CHECK-NEXT: DW_AT_type
70+
; CHECK-NEXT: DW_AT_external
71+
; CHECK-NEXT: DW_AT_decl_file
72+
; CHECK-NEXT: DW_AT_decl_line
73+
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
8174
!1 = distinct !DIGlobalVariable(name: "GlobA", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true)
8275
!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)
8376
!3 = !DIFile(filename: "variable-locations.cl", directory: "/some/random/directory")
8477
!4 = !{}
8578
!5 = !{!0, !6}
8679
!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
80+
81+
; CHECK: {{.*}}DW_TAG_variable
82+
; CHECK-NEXT: DW_AT_name {{.*}}"GlobB"
83+
; CHECK-NEXT: DW_AT_type
84+
; CHECK-NEXT: DW_AT_external
85+
; CHECK-NEXT: DW_AT_decl_file
86+
; CHECK-NEXT: DW_AT_decl_line
87+
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
8788
!7 = distinct !DIGlobalVariable(name: "GlobB", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true)
8889
!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
8990
!9 = !{i32 2, i32 0}

llvm/test/DebugInfo/BPF/extern-void.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ entry:
3636
; CHECK: .quad bla1
3737
; CHECK-NEXT: DW_TAG_variable
3838
;
39-
; CHECK: .quad bla2
39+
; CHECK: .quad bla2
4040
; CHECK-NEXT: DW_TAG_const_type
41-
; CHECK-NEXT: DW_TAG_subprogram
4241

4342
; Function Attrs: nounwind readnone speculatable willreturn
4443
declare void @llvm.dbg.value(metadata, metadata, metadata) #1

llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727
; The DISubprogram should show up in compile unit a.
2828
; CHECK: DW_TAG_compile_unit
2929
; CHECK-NOT: DW_TAG
30-
; CHECK: DW_AT_name ("b.cpp")
31-
; CHECK-NOT: DW_TAG_subprogram
30+
; CHECK: DW_AT_name ("a.cpp")
31+
; CHECK: DW_TAG_subprogram
32+
; CHECK-NOT: DW_TAG
33+
; CHECK: DW_AT_name ("func")
3234

3335
; CHECK: DW_TAG_compile_unit
3436
; CHECK-NOT: DW_TAG
35-
; CHECK: DW_AT_name ("a.cpp")
36-
; CHECK: DW_AT_name ("func")
37+
; CHECK: DW_AT_name ("b.cpp")
38+
; CHECK-NOT: DW_TAG_subprogram
3739

3840
source_filename = "test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll"
3941

llvm/test/DebugInfo/Generic/debug-info-qualifiers.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
; CHECK-NEXT: DW_AT_reference DW_FORM_flag_present
1919
; CHECK: DW_TAG_subroutine_type DW_CHILDREN_yes
2020
; CHECK-NEXT: DW_AT_rvalue_reference DW_FORM_flag_present
21+
22+
; CHECK: DW_TAG_subprogram
23+
; CHECK-NOT: DW_TAG_subprogram
24+
; CHECK: DW_AT_name {{.*}} "g")
2125
;
2226
; CHECK: DW_TAG_subprogram
2327
; CHECK-NOT: DW_TAG_subprogram

llvm/test/DebugInfo/Generic/debug-names-linkage-name.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
; We should have all three linkage names in the .debug_info and .debug_names
1313
; ALL: .debug_info contents:
14-
; ALL: DW_AT_linkage_name ("_ZN1n1vE")
1514
; ALL: DW_AT_linkage_name ("_Z1fi")
1615
; ALL: DW_AT_linkage_name ("_Z1gi")
16+
; ALL: DW_AT_linkage_name ("_ZN1n1vE")
1717
; ALL: .debug_names contents:
1818
; ALL: String: {{.*}} "_Z1fi"
1919
; ALL: String: {{.*}} "_Z1gi"

0 commit comments

Comments
 (0)