Skip to content

Commit 14fd6c8

Browse files
authored
Merge pull request #29506 from medismailben/master
Move swift runtime failure messages from linkage name to function name
2 parents d160503 + bf41881 commit 14fd6c8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,7 @@ void IRGenDebugInfoImpl::setCurrentLoc(IRBuilder &Builder,
18471847
auto DL = llvm::DebugLoc::get(L.Line, L.Column, Scope, InlinedAt);
18481848
Builder.SetCurrentDebugLocation(DL);
18491849
}
1850-
1850+
18511851
void IRGenDebugInfoImpl::addFailureMessageToCurrentLoc(IRBuilder &Builder,
18521852
StringRef failureMsg) {
18531853
auto TrapLoc = Builder.getCurrentDebugLocation();
@@ -1864,7 +1864,7 @@ void IRGenDebugInfoImpl::addFailureMessageToCurrentLoc(IRBuilder &Builder,
18641864
FuncName += failureMsg;
18651865

18661866
llvm::DISubprogram *TrapSP = DBuilder.createFunction(
1867-
MainModule, StringRef(), FuncName, TrapLoc->getFile(), 0, DIFnTy, 0,
1867+
MainModule, FuncName, StringRef(), TrapLoc->getFile(), 0, DIFnTy, 0,
18681868
llvm::DINode::FlagArtificial, llvm::DISubprogram::SPFlagDefinition,
18691869
nullptr, nullptr, nullptr);
18701870

test/DebugInfo/linetable-codeview.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func foo() {
8181
// FIXME: The location of ``@llvm.trap`` should be in Integers.swift.gyb
8282
// instead of being artificial.
8383
// CHECK: ![[INLINEDADD]] = !DILocation(line: 0, scope: ![[FAILURE_FUNC:[0-9]+]], inlinedAt: ![[INLINELOC:[0-9]+]]
84-
// CHECK-DAG: !{{.*}} = distinct !DISubprogram(linkageName: "Swift runtime failure: arithmetic overflow", scope: {{.*}}, flags: DIFlagArtificial, spFlags: DISPFlagDefinition, {{.*}})
84+
// CHECK-DAG: !{{.*}} = distinct !DISubprogram(name: "Swift runtime failure: arithmetic overflow", scope: {{.*}}, flags: DIFlagArtificial, spFlags: DISPFlagDefinition, {{.*}})
8585
// CHECK-DAG: ![[INLINELOC]] = !DILocation(line: 0, scope: !{{[0-9]+}}, inlinedAt: ![[ADD]]
8686

8787
// NOTE: These prologue instructions are given artificial line locations for

test/IRGen/condfail_message.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ func testit(_ a: Int8) -> Int8 {
1111

1212
// CHECK: [[CALLER_LOC:![0-9]+]] = !DILocation(line: 9, column: 12, scope: !{{.*}})
1313
// CHECK: [[LOC]] = !DILocation(line: 0, scope: [[FAILURE_FUNC:![0-9]+]], inlinedAt: [[CALLER_LOC]])
14-
// CHECK: [[FAILURE_FUNC]] = distinct !DISubprogram(linkageName: "Swift runtime failure: arithmetic overflow", scope: {{.*}}, file: {{.*}}, type: [[FUNC_TYPE:![0-9]+]], flags: DIFlagArtificial, spFlags: DISPFlagDefinition, {{.*}})
14+
// CHECK: [[FAILURE_FUNC]] = distinct !DISubprogram(name: "Swift runtime failure: arithmetic overflow", scope: {{.*}}, file: {{.*}}, type: [[FUNC_TYPE:![0-9]+]], flags: DIFlagArtificial, spFlags: DISPFlagDefinition, {{.*}})
1515
// CHECK: [[FUNC_TYPE]] = !DISubroutineType(types: null)
1616

0 commit comments

Comments
 (0)