xref: /llvm-project/clang/test/CodeGen/attr-weak-import.c (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1 // RUN: %clang_cc1 -triple x86_64-darwin-apple -emit-llvm -o - %s | FileCheck %s
2 
3 extern int A __attribute__((weak_import));
4 int A;
5 
6 extern int B __attribute__((weak_import));
7 extern int B;
8 
9 int C;
10 extern int C __attribute__((weak_import));
11 
12 extern int D __attribute__((weak_import));
13 extern int D __attribute__((weak_import));
14 int D;
15 
16 extern int E __attribute__((weak_import));
17 int E;
18 extern int E __attribute__((weak_import));
19 
20 // CHECK: @A = global i32
21 // CHECK-NOT: @B =
22 // CHECK: @C = global i32
23 // CHECK: @D = global i32
24 // CHECK: @E = global i32
25 
26