brintos

brintos / llvm-project-archived public Read only

0
0
Text · 785 B · 57f3f93 Raw
42 lines · plain
1// RUN: rm -rf %t.dir2// RUN: split-file %s %t.dir3// RUN: %clang_cc1 -fmodules -fimplicit-module-maps \4// RUN:   -fmodules-cache-path=%t.dir/cache -triple x86_64-apple-macosx10.11.0 \5// RUN:   -I%t.dir/headers %t.dir/main.m -emit-llvm -o %t.dir/main.ll6// RUN: cat %t.dir/main.ll | FileCheck %s7 8//--- headers/a.h9 10__attribute__((availability(macos,introduced=10.16)))11@interface INIntent12- (instancetype)self;13@end14 15//--- headers/b.h16 17@class INIntent;18 19//--- headers/module.modulemap20 21module A {22  header "a.h"23}24 25module B {26  header "b.h"27}28 29//--- main.m30 31#import <a.h>32#import <b.h> // NOTE: Non attributed decl imported after one with attrs.33 34void F(id);35 36int main() {37  if (@available(macOS 11.0, *))38    F([INIntent self]);39}40 41// CHECK: @"OBJC_CLASS_$_INIntent" = extern_weak42