ClangImporter: Remove -enable-c-function-pointers staging option.

Swift SVN r29764
This commit is contained in:
Joe Groff
2015-06-27 18:10:21 +00:00
parent 2630dba793
commit 55a830df38
8 changed files with 11 additions and 27 deletions

View File

@@ -77,9 +77,6 @@ namespace swift {
/// symbols as optionals. /// symbols as optionals.
bool EnableExperimentalUnavailableAsOptional = false; bool EnableExperimentalUnavailableAsOptional = false;
/// \brief Enable support for native C function pointer types.
bool EnableCFunctionPointers = true;
/// \brief Enable support for SIMD type imports. /// \brief Enable support for SIMD type imports.
bool EnableSIMDImport = true; bool EnableSIMDImport = true;

View File

@@ -195,10 +195,6 @@ def enable_availability_checking_in_implicit_functions : Flag<["-"],
"enable-availability-checking-in-implicit-functions">, "enable-availability-checking-in-implicit-functions">,
HelpText<"Enable checking availability 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<["-"], def enable_simd_import : Flag<["-"],
"enable-simd-import">, "enable-simd-import">,
HelpText<"Enable importing C vector types as SIMD types">; HelpText<"Enable importing C vector types as SIMD types">;

View File

@@ -326,7 +326,6 @@ namespace {
return getOpaquePointerType(); return getOpaquePointerType();
if (pointeeQualType->isFunctionType()) { if (pointeeQualType->isFunctionType()) {
if (Impl.SwiftContext.LangOpts.EnableCFunctionPointers) {
auto funcTy = pointeeType->castTo<FunctionType>(); auto funcTy = pointeeType->castTo<FunctionType>();
return { return {
FunctionType::get(funcTy->getInput(), funcTy->getResult(), FunctionType::get(funcTy->getInput(), funcTy->getResult(),
@@ -336,11 +335,6 @@ namespace {
}; };
} }
return Impl.getNamedSwiftTypeSpecialization(Impl.getStdlibModule(),
"CFunctionPointer",
pointeeType);
}
auto quals = pointeeQualType.getQualifiers(); auto quals = pointeeQualType.getQualifiers();
if (quals.hasConst()) if (quals.hasConst())

View File

@@ -638,9 +638,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.EnableExperimentalUnavailableAsOptional |= Opts.EnableExperimentalUnavailableAsOptional |=
Args.hasArg(OPT_enable_experimental_unavailable_as_optional); Args.hasArg(OPT_enable_experimental_unavailable_as_optional);
Opts.EnableCFunctionPointers |=
Args.hasArg(OPT_enable_c_function_pointers);
Opts.EnableSIMDImport |= Opts.EnableSIMDImport |=
Args.hasArg(OPT_enable_simd_import); Args.hasArg(OPT_enable_simd_import);

View File

@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir %t // 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 // RUN: %target-run %t/a.out | FileCheck %s
// REQUIRES: executable_test // REQUIRES: executable_test

View File

@@ -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 } func global() -> Int { return 0 }
struct S { struct S {

View File

@@ -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 { func values(arg: @convention(c) Int -> Int) -> @convention(c) Int -> Int {
return arg return arg

View File

@@ -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 // REQUIRES: objc_interop