mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ABI: Change the mangling prefix from _T0 to $S
This commit is contained in:
@@ -29,56 +29,56 @@ func test_partial_safety_check(x: Int, y: Int) -> Int {
|
||||
}
|
||||
|
||||
// In debug mode keep user asserts and runtime checks.
|
||||
// DEBUG-LABEL: sil hidden @_T019OptimizationOptions11test_assert1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// DEBUG-LABEL: sil hidden @$S19OptimizationOptions11test_assert1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// DEBUG-DAG: string_literal utf8 "x smaller than y"
|
||||
// DEBUG-DAG: string_literal utf8 "Assertion failed"
|
||||
// DEBUG-DAG: cond_fail
|
||||
// DEBUG: return
|
||||
|
||||
// In playground mode keep user asserts and runtime checks.
|
||||
// PLAYGROUND-LABEL: sil hidden @_T019OptimizationOptions11test_assert1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// PLAYGROUND-LABEL: sil hidden @$S19OptimizationOptions11test_assert1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// PLAYGROUND-DAG: "Assertion failed"
|
||||
// PLAYGROUND-DAG: "x smaller than y"
|
||||
// PLAYGROUND-DAG: cond_fail
|
||||
// PLAYGROUND: return
|
||||
|
||||
// In release mode remove user asserts and keep runtime checks.
|
||||
// RELEASE-LABEL: sil hidden @_T019OptimizationOptions11test_assert1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// RELEASE-LABEL: sil hidden @$S19OptimizationOptions11test_assert1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// RELEASE-NOT: "x smaller than y"
|
||||
// RELEASE-NOT: "Assertion failed"
|
||||
// RELEASE: cond_fail
|
||||
// RELEASE: return
|
||||
|
||||
// In fast mode remove user asserts and runtime checks.
|
||||
// FAST-LABEL: sil hidden @_T019OptimizationOptions11test_assert1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// FAST-LABEL: sil hidden @$S19OptimizationOptions11test_assert1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// FAST-NOT: "x smaller than y"
|
||||
// FAST-NOT: "Assertion failed"
|
||||
// FAST-NOT: cond_fail
|
||||
|
||||
|
||||
// In debug mode keep verbose fatal errors.
|
||||
// DEBUG-LABEL: sil hidden @_T019OptimizationOptions10test_fatal1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// DEBUG-LABEL: sil hidden @$S19OptimizationOptions10test_fatal1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// DEBUG-DAG: "Human nature ..."
|
||||
// DEBUG-DAG: %[[FATAL_ERROR:.+]] = function_ref @[[FATAL_ERROR_FUNC:.*fatalErrorMessage.*]] : $@convention(thin)
|
||||
// DEBUG: apply %[[FATAL_ERROR]]{{.*}}
|
||||
// DEBUG: unreachable
|
||||
|
||||
// In playground mode keep verbose fatal errors.
|
||||
// PLAYGROUND-LABEL: sil hidden @_T019OptimizationOptions10test_fatal1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// PLAYGROUND-LABEL: sil hidden @$S19OptimizationOptions10test_fatal1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// PLAYGROUND-DAG: "Human nature ..."
|
||||
// PLAYGROUND-DAG: %[[FATAL_ERROR:.+]] = function_ref @[[FATAL_ERROR_FUNC:.*fatalErrorMessage.*]] : $@convention(thin)
|
||||
// PLAYGROUND: apply %[[FATAL_ERROR]]{{.*}}
|
||||
// PLAYGROUND: unreachable
|
||||
|
||||
// In release mode keep succinct fatal errors (trap).
|
||||
// RELEASE-LABEL: sil hidden @_T019OptimizationOptions10test_fatal1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// RELEASE-LABEL: sil hidden @$S19OptimizationOptions10test_fatal1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// RELEASE-NOT: "Human nature ..."
|
||||
// RELEASE-NOT: "Fatal error"
|
||||
// RELEASE: cond_fail
|
||||
// RELEASE: return
|
||||
|
||||
// In fast mode remove fatal errors.
|
||||
// FAST-LABEL: sil hidden @_T019OptimizationOptions10test_fatal1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// FAST-LABEL: sil hidden @$S19OptimizationOptions10test_fatal1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// FAST-NOT: "Human nature ..."
|
||||
// FAST-NOT: "Fatal error"
|
||||
// FAST-NOT: int_trap
|
||||
@@ -86,7 +86,7 @@ func test_partial_safety_check(x: Int, y: Int) -> Int {
|
||||
// Precondition safety checks.
|
||||
|
||||
// In debug mode keep verbose library precondition checks.
|
||||
// DEBUG-LABEL: sil hidden @_T019OptimizationOptions23test_precondition_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// DEBUG-LABEL: sil hidden @$S19OptimizationOptions23test_precondition_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// DEBUG-DAG: "Fatal error"
|
||||
// DEBUG-DAG: %[[FATAL_ERROR:.+]] = function_ref @[[FATAL_ERROR_FUNC]]
|
||||
// DEBUG: apply %[[FATAL_ERROR]]{{.*}}
|
||||
@@ -94,7 +94,7 @@ func test_partial_safety_check(x: Int, y: Int) -> Int {
|
||||
// DEBUG: return
|
||||
|
||||
// In playground mode keep verbose library precondition checks.
|
||||
// PLAYGROUND-LABEL: sil hidden @_T019OptimizationOptions23test_precondition_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// PLAYGROUND-LABEL: sil hidden @$S19OptimizationOptions23test_precondition_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// PLAYGROUND-DAG: "Fatal error"
|
||||
// PLAYGROUND-DAG: %[[FATAL_ERROR:.+]] = function_ref @[[FATAL_ERROR_FUNC]]
|
||||
// PLAYGROUND: apply %[[FATAL_ERROR]]{{.*}}
|
||||
@@ -102,14 +102,14 @@ func test_partial_safety_check(x: Int, y: Int) -> Int {
|
||||
// PLAYGROUND: return
|
||||
|
||||
// In release mode keep succinct library precondition checks (trap).
|
||||
// RELEASE-LABEL: sil hidden @_T019OptimizationOptions23test_precondition_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// RELEASE-LABEL: sil hidden @$S19OptimizationOptions23test_precondition_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// RELEASE-NOT: "Fatal error"
|
||||
// RELEASE: %[[V2:.+]] = builtin "xor_Int1"(%{{.+}}, %{{.+}})
|
||||
// RELEASE: cond_fail %[[V2]]
|
||||
// RELEASE: return
|
||||
|
||||
// In unchecked mode remove library precondition checks.
|
||||
// UNCHECKED-LABEL: sil hidden @_T019OptimizationOptions23test_precondition_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// UNCHECKED-LABEL: sil hidden @$S19OptimizationOptions23test_precondition_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// UNCHECKED-NOT: "Fatal error"
|
||||
// UNCHECKED-NOT: builtin "int_trap"
|
||||
// UNCHECKED-NOT: unreachable
|
||||
@@ -118,28 +118,28 @@ func test_partial_safety_check(x: Int, y: Int) -> Int {
|
||||
// Partial safety checks.
|
||||
|
||||
// In debug mode keep verbose partial safety checks.
|
||||
// DEBUG-LABEL: sil hidden @_T019OptimizationOptions25test_partial_safety_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// DEBUG-LABEL: sil hidden @$S19OptimizationOptions25test_partial_safety_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// DEBUG-DAG: "Fatal error"
|
||||
// DEBUG-DAG: %[[FATAL_ERROR:.+]] = function_ref @[[FATAL_ERROR_FUNC]]
|
||||
// DEBUG: apply %[[FATAL_ERROR]]{{.*}}
|
||||
// DEBUG: unreachable
|
||||
|
||||
// In playground mode keep verbose partial safety checks.
|
||||
// PLAYGROUND-LABEL: sil hidden @_T019OptimizationOptions25test_partial_safety_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// PLAYGROUND-LABEL: sil hidden @$S19OptimizationOptions25test_partial_safety_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// PLAYGROUND-DAG: "Fatal error"
|
||||
// PLAYGROUND-DAG: %[[FATAL_ERROR:.+]] = function_ref @[[FATAL_ERROR_FUNC]]
|
||||
// PLAYGROUND: apply %[[FATAL_ERROR]]{{.*}}
|
||||
// PLAYGROUND: unreachable
|
||||
|
||||
// In release mode remove partial safety checks.
|
||||
// RELEASE-LABEL: sil hidden @_T019OptimizationOptions25test_partial_safety_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// RELEASE-LABEL: sil hidden @$S19OptimizationOptions25test_partial_safety_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// RELEASE-NOT: "Fatal error"
|
||||
// RELEASE-NOT: builtin "int_trap"
|
||||
// RELEASE-NOT: unreachable
|
||||
// RELEASE: return
|
||||
|
||||
// In fast mode remove partial safety checks.
|
||||
// FAST-LABEL: sil hidden @_T019OptimizationOptions25test_partial_safety_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// FAST-LABEL: sil hidden @$S19OptimizationOptions25test_partial_safety_check1x1yS2i_SitF : $@convention(thin) (Int, Int) -> Int {
|
||||
// FAST-NOT: "Fatal error"
|
||||
// FAST-NOT: builtin "int_trap"
|
||||
// FAST-NOT: unreachable
|
||||
|
||||
Reference in New Issue
Block a user