mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ClangImporter: Remove -enable-c-function-pointers staging option.
Swift SVN r29764
This commit is contained in:
@@ -77,9 +77,6 @@ namespace swift {
|
||||
/// symbols as optionals.
|
||||
bool EnableExperimentalUnavailableAsOptional = false;
|
||||
|
||||
/// \brief Enable support for native C function pointer types.
|
||||
bool EnableCFunctionPointers = true;
|
||||
|
||||
/// \brief Enable support for SIMD type imports.
|
||||
bool EnableSIMDImport = true;
|
||||
|
||||
|
||||
@@ -195,10 +195,6 @@ def enable_availability_checking_in_implicit_functions : Flag<["-"],
|
||||
"enable-availability-checking-in-implicit-functions">,
|
||||
HelpText<"Enable checking availability in implicit functions">;
|
||||
|
||||
def enable_c_function_pointers : Flag<["-"],
|
||||
"enable-c-function-pointers">,
|
||||
HelpText<"Enable native C function pointer types">;
|
||||
|
||||
def enable_simd_import : Flag<["-"],
|
||||
"enable-simd-import">,
|
||||
HelpText<"Enable importing C vector types as SIMD types">;
|
||||
|
||||
@@ -326,7 +326,6 @@ namespace {
|
||||
return getOpaquePointerType();
|
||||
|
||||
if (pointeeQualType->isFunctionType()) {
|
||||
if (Impl.SwiftContext.LangOpts.EnableCFunctionPointers) {
|
||||
auto funcTy = pointeeType->castTo<FunctionType>();
|
||||
return {
|
||||
FunctionType::get(funcTy->getInput(), funcTy->getResult(),
|
||||
@@ -336,11 +335,6 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
return Impl.getNamedSwiftTypeSpecialization(Impl.getStdlibModule(),
|
||||
"CFunctionPointer",
|
||||
pointeeType);
|
||||
}
|
||||
|
||||
auto quals = pointeeQualType.getQualifiers();
|
||||
|
||||
if (quals.hasConst())
|
||||
|
||||
@@ -638,9 +638,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.EnableExperimentalUnavailableAsOptional |=
|
||||
Args.hasArg(OPT_enable_experimental_unavailable_as_optional);
|
||||
|
||||
Opts.EnableCFunctionPointers |=
|
||||
Args.hasArg(OPT_enable_c_function_pointers);
|
||||
|
||||
Opts.EnableSIMDImport |=
|
||||
Args.hasArg(OPT_enable_simd_import);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: rm -rf %t && mkdir %t
|
||||
// RUN: %target-build-swift %s -Xfrontend -enable-c-function-pointers -o %t/a.out
|
||||
// RUN: %target-build-swift %s -o %t/a.out
|
||||
// RUN: %target-run %t/a.out | FileCheck %s
|
||||
// REQUIRES: executable_test
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -parse -verify -module-name main -enable-c-function-pointers %s
|
||||
// RUN: %target-swift-frontend -parse -verify -module-name main %s
|
||||
func global() -> Int { return 0 }
|
||||
|
||||
struct S {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -emit-silgen -enable-c-function-pointers %s | FileCheck %s
|
||||
// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s
|
||||
|
||||
func values(arg: @convention(c) Int -> Int) -> @convention(c) Int -> Int {
|
||||
return arg
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -verify -enable-c-function-pointers -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import -disable-objc-attr-requires-foundation-module %s | FileCheck %s
|
||||
// RUN: %target-swift-frontend -verify -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import -disable-objc-attr-requires-foundation-module %s | FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user