2 // RUN: split-file %s %t
3 // RUN: %clang_cc1 -emit-llvm -o %t/test.bc -F%t/Frameworks %t/test.m -DHIDDEN_FIRST=1 \
4 // RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/modules.cache
5 // RUN: %clang_cc1 -emit-llvm -o %t/test.bc -F%t/Frameworks %t/test.m -DHIDDEN_FIRST=0 \
6 // RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/modules.cache
7 // UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}
9 // Test a case when Objective-C interface is imported both as hidden and as visible.
11 //--- Frameworks/Foundation.framework/Headers/Foundation.h
15 //--- Frameworks/Foundation.framework/Modules/module.modulemap
16 framework module Foundation {
21 //--- Frameworks/Regular.framework/Headers/Regular.h
22 #import <Foundation/Foundation.h>
23 @interface Regular : NSObject
26 //--- Frameworks/Regular.framework/Modules/module.modulemap
27 framework module Regular {
32 //--- Frameworks/RegularHider.framework/Headers/Visible.h
33 // Empty, file required to create a module.
35 //--- Frameworks/RegularHider.framework/Headers/Hidden.h
36 #import <Foundation/Foundation.h>
37 @interface Regular : NSObject
40 //--- Frameworks/RegularHider.framework/Modules/module.modulemap
41 framework module RegularHider {
45 explicit module Hidden {
54 #import <RegularHider/Visible.h>
55 #import <Regular/Regular.h>
57 #import <Regular/Regular.h>
58 #import <RegularHider/Visible.h>
61 @interface SubClass : Regular