mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Remove the -enable-union-import staging flag.
Swift SVN r25809
This commit is contained in:
@@ -109,9 +109,6 @@ namespace swift {
|
||||
/// it gets disabled when compiling the Swift core stdlib.
|
||||
bool EnableObjCAttrRequiresFoundation = true;
|
||||
|
||||
/// Enables importing of unions and other partially-importable types.
|
||||
bool ImportUnions = true;
|
||||
|
||||
/// Should access control be respected?
|
||||
bool EnableAccessControl = true;
|
||||
|
||||
|
||||
@@ -181,10 +181,6 @@ def enable_private_discriminators :
|
||||
Flag<["-"], "enable-private-discriminators">,
|
||||
HelpText<"Mangle discriminators into the symbol names for private entities">;
|
||||
|
||||
def enable_union_import :
|
||||
Flag<["-"], "enable-union-import">,
|
||||
HelpText<"Import C unions">;
|
||||
|
||||
def enable_source_import : Flag<["-"], "enable-source-import">,
|
||||
HelpText<"Enable importing of Swift source files">;
|
||||
|
||||
|
||||
@@ -1985,15 +1985,9 @@ namespace {
|
||||
// initialized.
|
||||
bool hasZeroInitializableStorage = true;
|
||||
|
||||
if (decl->isUnion()) {
|
||||
if (Impl.SwiftContext.LangOpts.ImportUnions) {
|
||||
if (decl->isUnion())
|
||||
// Import the union, but don't make its storage accessible for now.
|
||||
hasUnreferenceableStorage = true;
|
||||
} else {
|
||||
// FIXME: Skip unions for now.
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Skip Microsoft __interfaces.
|
||||
if (decl->isInterface())
|
||||
@@ -2028,16 +2022,9 @@ namespace {
|
||||
for (auto m = decl->decls_begin(), mEnd = decl->decls_end();
|
||||
m != mEnd; ++m) {
|
||||
if (auto FD = dyn_cast<clang::FieldDecl>(*m))
|
||||
if (FD->isBitField()) {
|
||||
if (Impl.SwiftContext.LangOpts.ImportUnions) {
|
||||
if (FD->isBitField())
|
||||
// We don't make bitfields accessible in Swift yet.
|
||||
hasUnreferenceableStorage = true;
|
||||
} else {
|
||||
// We don't import structs with bitfields because we can not
|
||||
// lay them out correctly in IRGen.
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create the struct declaration and record it.
|
||||
|
||||
@@ -612,8 +612,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
= A->getOption().matches(OPT_enable_access_control);
|
||||
}
|
||||
|
||||
Opts.ImportUnions |= Args.hasArg(OPT_enable_union_import);
|
||||
|
||||
Opts.DebugConstraintSolver |= Args.hasArg(OPT_debug_constraints);
|
||||
Opts.DebugGenericSignatures |= Args.hasArg(OPT_debug_generic_signatures);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-union-import -parse -verify %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse -verify %s
|
||||
|
||||
// XFAIL: linux
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-union-import | FileCheck %s --check-prefix=CHECK-%target-cpu
|
||||
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir | FileCheck %s --check-prefix=CHECK-%target-cpu
|
||||
|
||||
sil_stage canonical
|
||||
import c_layout
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -sdk %S/Inputs -O -emit-sil -I %S/Inputs -enable-source-import -primary-file %s -enable-union-import | FileCheck %s
|
||||
// RUN: %target-swift-frontend -sdk %S/Inputs -O -emit-sil -I %S/Inputs -enable-source-import -primary-file %s | FileCheck %s
|
||||
|
||||
import gizmo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user