brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · cbb97e7 Raw
63 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// 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.cache5// 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.cache7// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}8 9// Test a case when Objective-C interface is imported both as hidden and as visible.10 11//--- Frameworks/Foundation.framework/Headers/Foundation.h12@interface NSObject13@end14 15//--- Frameworks/Foundation.framework/Modules/module.modulemap16framework module Foundation {17  header "Foundation.h"18  export *19}20 21//--- Frameworks/Regular.framework/Headers/Regular.h22#import <Foundation/Foundation.h>23@interface Regular : NSObject24@end25 26//--- Frameworks/Regular.framework/Modules/module.modulemap27framework module Regular {28  header "Regular.h"29  export *30}31 32//--- Frameworks/RegularHider.framework/Headers/Visible.h33// Empty, file required to create a module.34 35//--- Frameworks/RegularHider.framework/Headers/Hidden.h36#import <Foundation/Foundation.h>37@interface Regular : NSObject38@end39 40//--- Frameworks/RegularHider.framework/Modules/module.modulemap41framework module RegularHider {42  header "Visible.h"43  export *44 45  explicit module Hidden {46    header "Hidden.h"47    export *48  }49}50 51//--- test.m52 53#if HIDDEN_FIRST54#import <RegularHider/Visible.h>55#import <Regular/Regular.h>56#else57#import <Regular/Regular.h>58#import <RegularHider/Visible.h>59#endif60 61@interface SubClass : Regular62@end63