[lldb] Import ObjectiveC module instead of Foundation in test
authorDave Lee <davelee.com@gmail.com>
Sun, 4 Apr 2021 15:28:10 +0000 (08:28 -0700)
committerDave Lee <davelee.com@gmail.com>
Mon, 5 Apr 2021 03:04:26 +0000 (20:04 -0700)
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

lldb/test/API/lang/objc/modules-app-update/TestClangModulesAppUpdate.py
lldb/test/API/lang/objc/modules-app-update/foo.m

index 29c4872..45870e8 100644 (file)
@@ -20,7 +20,7 @@ class TestClangModuleAppUpdate(TestBase):
                     """)
         with open(self.getBuildArtifact("f.h"), "w") as f:
             f.write("""
-                    @import Foundation;
+                    @import ObjectiveC;
                     @interface Foo : NSObject {
                        int i;
                     }
index 83a5abc..f9f244c 100644 (file)
@@ -1,4 +1,4 @@
-@import Foundation;
+@import ObjectiveC;
 @import Foo;
 @implementation Foo
 +(instancetype)init {