mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Remove Swift 3 @objc behavior
This commit is contained in:
@@ -364,8 +364,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
|
||||
Opts.EnableSwift3ObjCInference =
|
||||
Args.hasFlag(OPT_enable_swift3_objc_inference,
|
||||
OPT_disable_swift3_objc_inference,
|
||||
Opts.isSwiftVersion3());
|
||||
OPT_disable_swift3_objc_inference, false);
|
||||
|
||||
if (Opts.EnableSwift3ObjCInference) {
|
||||
if (const Arg *A = Args.getLastArg(
|
||||
|
||||
@@ -1425,14 +1425,10 @@ void SILGenFunction::emitNativeToForeignThunk(SILDeclRef thunk) {
|
||||
}
|
||||
|
||||
if (auto attr = decl->getAttrs().getAttribute<ObjCAttr>()) {
|
||||
// If @objc was inferred based on the Swift 3 @objc inference rules, but
|
||||
// we aren't compiling in Swift 3 compatibility mode, emit a call to
|
||||
// Builtin.swift3ImplicitObjCEntrypoint() to enable runtime logging of
|
||||
// the uses of such entrypoints.
|
||||
if (attr->isSwift3Inferred() &&
|
||||
!decl->isDynamic() &&
|
||||
!getASTContext().LangOpts.isSwiftVersion3()) {
|
||||
|
||||
// If @objc was inferred based on the Swift 3 @objc inference rules, emit
|
||||
// a call to Builtin.swift3ImplicitObjCEntrypoint() to enable runtime
|
||||
// logging of the uses of such entrypoints.
|
||||
if (attr->isSwift3Inferred() && !decl->isDynamic()) {
|
||||
// Get the starting source location of the declaration so we can say
|
||||
// exactly where to stick '@objc'.
|
||||
SourceLoc objcInsertionLoc =
|
||||
|
||||
Reference in New Issue
Block a user