Skip to content

Commit 2a5ba00

Browse files
authored
Merge pull request #68036 from meg-gupta/enableptrauth
Enable importing ptrauth qualified function pointers from c by default
2 parents e5d7885 + 09580fc commit 2a5ba00

File tree

6 files changed

+6
-11
lines changed

6 files changed

+6
-11
lines changed

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,9 +1229,6 @@ def enable_move_inout_stack_protector :
12291229
Flag<["-"], "enable-move-inout-stack-protector">,
12301230
HelpText<"Enable the stack protector by moving values to temporaries">;
12311231

1232-
def enable_import_ptrauth_field_function_pointers :
1233-
Flag<["-"], "enable-import-ptrauth-field-function-pointers">,
1234-
HelpText<"Enable import of custom ptrauth qualified field function pointers">;
12351232
def disable_import_ptrauth_field_function_pointers :
12361233
Flag<["-"], "disable-import-ptrauth-field-function-pointers">,
12371234
HelpText<"Disable import of custom ptrauth qualified field function pointers">;

lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,9 +2417,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
24172417
OPT_enable_move_inout_stack_protector, OPT_disable_stack_protector,
24182418
Opts.EnableMoveInoutStackProtection);
24192419
Opts.EnableImportPtrauthFieldFunctionPointers =
2420-
Args.hasArg(OPT_enable_import_ptrauth_field_function_pointers,
2421-
OPT_disable_import_ptrauth_field_function_pointers,
2422-
Opts.EnableImportPtrauthFieldFunctionPointers);
2420+
!Args.hasArg(OPT_disable_import_ptrauth_field_function_pointers);
24232421
Opts.EnableLifetimeDependenceDiagnostics =
24242422
Args.hasFlag(OPT_enable_lifetime_dependence_diagnostics,
24252423
OPT_disable_lifetime_dependence_diagnostics,

test/IRGen/ptrauth_field_fptr_import.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift-frontend %s -enable-import-ptrauth-field-function-pointers -emit-ir -target arm64e-apple-ios13.0 -I %S/Inputs/ -validate-tbd-against-ir=none -Xllvm -sil-disable-pass=OnoneSimplification | %FileCheck %s
1+
// RUN: %swift-frontend %s -emit-ir -target arm64e-apple-ios13.0 -I %S/Inputs/ -validate-tbd-against-ir=none -Xllvm -sil-disable-pass=OnoneSimplification | %FileCheck %s
22
// REQUIRES: CPU=arm64e
33
// REQUIRES: OS=ios
44

test/SILGen/ptrauth_field_fptr_import.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift-frontend %s -enable-import-ptrauth-field-function-pointers -emit-silgen -target arm64e-apple-ios13.0 -I %S/Inputs/ | %FileCheck %s
1+
// RUN: %swift-frontend %s -emit-silgen -target arm64e-apple-ios13.0 -I %S/Inputs/ | %FileCheck %s
22

33
// REQUIRES: CPU=arm64e
44
// REQUIRES: OS=ios

test/embedded/ptrauth-fieldptr1.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %{python} %utils/split_file.py -o %t %s
33

4-
// RUN: %target-swift-frontend -enable-import-ptrauth-field-function-pointers -O -emit-ir %t/Main.swift -enable-experimental-feature Embedded -import-objc-header %t/header.h | %FileCheck %s
4+
// RUN: %target-swift-frontend -O -emit-ir %t/Main.swift -enable-experimental-feature Embedded -import-objc-header %t/header.h | %FileCheck %s
55

66
// REQUIRES: swift_in_compiler
77
// REQUIRES: OS=macosx || OS=linux-gnu

test/embedded/ptrauth-fieldptr2.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %{python} %utils/split_file.py -o %t %s
33

4-
// RUN: %target-swift-frontend -enable-import-ptrauth-field-function-pointers -O -emit-module -o %t/Module.swiftmodule %t/Module.swift -enable-experimental-feature Embedded -import-objc-header %t/header.h
4+
// RUN: %target-swift-frontend -O -emit-module -o %t/Module.swiftmodule %t/Module.swift -enable-experimental-feature Embedded -import-objc-header %t/header.h
55

6-
// RUN: %target-swift-frontend -enable-import-ptrauth-field-function-pointers -O -emit-ir %t/Main.swift -I%t -enable-experimental-feature Embedded -import-objc-header %t/header.h
6+
// RUN: %target-swift-frontend -O -emit-ir %t/Main.swift -I%t -enable-experimental-feature Embedded -import-objc-header %t/header.h
77

88
// REQUIRES: swift_in_compiler
99
// REQUIRES: OS=macosx || OS=linux-gnu

0 commit comments

Comments
 (0)