Skip to content

Commit 6cf2ccc

Browse files
committed
[Runtime][Test] Add a leading underscore to swift_exceptionPersonality.
The other new runtime functions appear to have a leading underscore. It makes sense in this case because we don't expect anything to call this directly (other than the unwinder). rdar://120952971
1 parent 00d1865 commit 6cf2ccc

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

include/swift/Runtime/RuntimeFunctions.def

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,13 +2807,13 @@ FUNCTION(InitRawStructMetadata,
28072807
EFFECT(MetaData),
28082808
UNKNOWN_MEMEFFECTS)
28092809

2810-
// _Unwind_Reason_Code swift_exceptionPersonality(int version,
2811-
// _Unwind_Action actions,
2812-
// uint64 exceptionClass,
2813-
// struct _Unwind_Exception *exceptionObject,
2814-
// struct _Unwind_Context *context);
2810+
// _Unwind_Reason_Code _swift_exceptionPersonality(int version,
2811+
// _Unwind_Action actions,
2812+
// uint64 exceptionClass,
2813+
// struct _Unwind_Exception *exceptionObject,
2814+
// struct _Unwind_Context *context);
28152815
FUNCTION(ExceptionPersonality,
2816-
swift_exceptionPersonality,
2816+
_swift_exceptionPersonality,
28172817
C_CC, AlwaysAvailable,
28182818
RETURNS(Int32Ty),
28192819
ARGS(Int32Ty,

stdlib/public/runtime/Exception.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ using namespace swift;
3333
extern "C" void __cxa_begin_catch(void *);
3434

3535
SWIFT_RUNTIME_STDLIB_API _Unwind_Reason_Code
36-
swift_exceptionPersonality(int version,
37-
_Unwind_Action actions,
38-
uint64_t exceptionClass,
39-
struct _Unwind_Exception *exceptionObject,
40-
struct _Unwind_Context *context)
36+
_swift_exceptionPersonality(int version,
37+
_Unwind_Action actions,
38+
uint64_t exceptionClass,
39+
struct _Unwind_Exception *exceptionObject,
40+
struct _Unwind_Context *context)
4141
{
4242
// Handle exceptions by catching them and calling std::terminate().
4343
// This, in turn, will trigger the unhandled exception routine in the

test/Interop/Cxx/exceptions/objc-trap-on-exception-irgen-itanium.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func testObjCMethodCall() {
3232

3333
testObjCMethodCall()
3434

35-
// CHECK: define {{.*}} @"$s4test0A14ObjCMethodCallyyF"() #[[#UWATTR:]] personality ptr @swift_exceptionPersonality
35+
// CHECK: define {{.*}} @"$s4test0A14ObjCMethodCallyyF"() #[[#UWATTR:]] personality ptr @_swift_exceptionPersonality
3636
// CHECK: invoke void {{.*}}@objc_msgSend
3737
// CHECK-NEXT: to label %[[CONT1:.*]] unwind label %[[UNWIND1:.*]]
3838
// CHECK-EMPTY:

test/Interop/Cxx/exceptions/trap-on-exception-irgen-itanium.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public func test() {
309309
// CHECK-NEXT: ret i32
310310
// CHECK-NEXT: }
311311

312-
// CHECK: define {{.*}} @"$s4test0A17FreeFunctionCallss5Int32VyF"() #[[#SWIFTUWMETA:]] personality ptr @swift_exceptionPersonality
312+
// CHECK: define {{.*}} @"$s4test0A17FreeFunctionCallss5Int32VyF"() #[[#SWIFTUWMETA:]] personality ptr @_swift_exceptionPersonality
313313
// CHECK: invoke i32 @_Z18freeFunctionThrowsi(i32 0)
314314
// CHECK-NEXT: to label %[[CONT1:.*]] unwind label %[[UNWIND1:.*]]
315315
// CHECK-EMPTY:
@@ -335,7 +335,7 @@ public func test() {
335335
// CHECK-NEXT: unreachable
336336
// CHECK-NEXT: }
337337

338-
// CHECK: i32 @__gxx_personality_v0(...)
338+
// CHECK: i32 @_swift_exceptionPersonality(...)
339339

340340
// CHECK: define {{.*}} @"$s4test0A11MethodCallss5Int32VyF"() #[[#SWIFTUWMETA]] personality
341341
// CHECK: call swiftcc i32 @"$s4test8makeCInts5Int32VyF"()

test/abi/macOS/arm64/stdlib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,4 @@ Added: __swift_pod_destroy
254254
Added: __swift_pod_direct_initializeBufferWithCopyOfBuffer
255255
Added: __swift_pod_indirect_initializeBufferWithCopyOfBuffer
256256
Added: __swift_validatePrespecializedMetadata
257-
Added: _swift_exceptionPersonality
257+
Added: __swift_exceptionPersonality

test/abi/macOS/x86_64/stdlib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,5 +254,5 @@ Added: __swift_pod_destroy
254254
Added: __swift_pod_direct_initializeBufferWithCopyOfBuffer
255255
Added: __swift_pod_indirect_initializeBufferWithCopyOfBuffer
256256
Added: __swift_validatePrespecializedMetadata
257-
Added: _swift_exceptionPersonality
257+
Added: __swift_exceptionPersonality
258258

0 commit comments

Comments
 (0)