Use `@import ObjectiveC` instead of `@import Foundation`, as the former is all
that's needed, and results in fewer clang modules being built.
This results in the following clang modules *not* being built for this test.
ApplicationServices
CFNetwork
ColorSync
CoreFoundation
CoreGraphics
CoreServices
CoreText
DiskArbitration
Dispatch
Foundation
IOKit
ImageIO
Security
XPC
_Builtin_intrinsics
launch
libkern
os_object
os_workgroup
Differential Revision: https://reviews.llvm.org/D99859
""")
with open(self.getBuildArtifact("f.h"), "w") as f:
f.write("""
- @import Foundation;
+ @import ObjectiveC;
@interface Foo : NSObject {
int i;
}
-@import Foundation;
+@import ObjectiveC;
@import Foo;
@implementation Foo
+(instancetype)init {