mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[PrintAsObjC] Only include internal decls if we have a bridging header.
The upshot of this is that internal decls in an app target will be in the generated header but internal decls in a framework target will not. This is important since the generated header is part of a framework's public interface. Users always have the option to add members via category to an internal framework type they need to use from Objective-C, or to write the @interface themselves if the entire type is missing. Only internal protocols are left out by this. The presence of the bridging header isn't a /perfect/ way to decide this, but it's close enough. In an app target without a bridging header, it's unlikely that there will be ObjC sources depending on the generated header. Swift SVN r19763
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// RUN: rm -rf %t
|
||||
// RUN: mkdir %t
|
||||
// RUN: %swift %clang-importer-sdk -module-cache-path %t/clang-module-cache -enable-source-import -emit-module -o %t %s
|
||||
// RUN: %swift %clang-importer-sdk -module-cache-path %t/clang-module-cache -parse-as-library %t/classes.swiftmodule -parse -emit-objc-header-path %t/classes.h
|
||||
// RUN: %swift %clang-importer-sdk -module-cache-path %t/clang-module-cache -parse-as-library %t/classes.swiftmodule -parse -emit-objc-header-path %t/classes.h -import-objc-header %S/../Inputs/empty.h
|
||||
// RUN: FileCheck %s < %t/classes.h
|
||||
// RUN: FileCheck --check-prefix=NEGATIVE %s < %t/classes.h
|
||||
// RUN: %check-in-clang %t/classes.h
|
||||
|
||||
Reference in New Issue
Block a user