| 1 |
// RUN: %clang_cc1 -triple thumbv7-windows -fdeclspec -DCF_BUILDING_CF -DDECL -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-IN-CF-DECL |
| 2 |
// RUN: %clang_cc1 -triple thumbv7-windows -fdeclspec -DCF_BUILDING_CF -DDEFN -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-IN-CF-DEFN |
| 3 |
// RUN: %clang_cc1 -triple thumbv7-windows -fdeclspec -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF |
| 4 |
// RUN: %clang_cc1 -triple thumbv7-windows -fdeclspec -DEXTERN -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-EXTERN |
| 5 |
// RUN: %clang_cc1 -triple thumbv7-windows -fdeclspec -DEXTERN_DLLIMPORT -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-EXTERN-DLLIMPORT |
| 6 |
// RUN: %clang_cc1 -triple thumbv7-windows -fdeclspec -DDLLIMPORT -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-DLLIMPORT |
| 7 |
|
| 8 |
// RUN: %clang_cc1 -Os -triple thumbv7-windows -fdeclspec -DCF_BUILDING_CF -DDECL -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-IN-CF-DECL |
| 9 |
// RUN: %clang_cc1 -Os -triple thumbv7-windows -fdeclspec -DCF_BUILDING_CF -DDEFN -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-IN-CF-DEFN |
| 10 |
// RUN: %clang_cc1 -Os -triple thumbv7-windows -fdeclspec -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF |
| 11 |
// RUN: %clang_cc1 -Os -triple thumbv7-windows -fdeclspec -DEXTERN -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-EXTERN |
| 12 |
// RUN: %clang_cc1 -Os -triple thumbv7-windows -fdeclspec -DEXTERN_DLLIMPORT -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-EXTERN-DLLIMPORT |
| 13 |
// RUN: %clang_cc1 -Os -triple thumbv7-windows -fdeclspec -DDLLIMPORT -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-CF-DLLIMPORT |
| 14 |
|
| 15 |
#if defined(CF_BUILDING_CF) |
| 16 |
#if defined(DECL) |
| 17 |
extern __declspec(dllexport) long __CFConstantStringClassReference[]; |
| 18 |
#elif defined(DEFN) |
| 19 |
__declspec(dllexport) long __CFConstantStringClassReference[32]; |
| 20 |
#endif |
| 21 |
#else |
| 22 |
#if defined(EXTERN) |
| 23 |
extern long __CFConstantStringClassReference[]; |
| 24 |
#elif defined(EXTERN_DLLIMPORT) |
| 25 |
extern __declspec(dllimport) long __CFConstantStringClassReference[]; |
| 26 |
#elif defined(DLLIMPORT) |
| 27 |
__declspec(dllimport) long __CFConstantStringClassReference[]; |
| 28 |
#endif |
| 29 |
#endif |
| 30 |
|
| 31 |
typedef struct __CFString *CFStringRef; |
| 32 |
const CFStringRef string = (CFStringRef)__builtin___CFStringMakeConstantString("string"); |
| 33 |
|
| 34 |
// CHECK-CF-IN-CF-DECL: @__CFConstantStringClassReference = external dso_local dllexport global [0 x i32] |
| 35 |
// CHECK-CF-IN-CF-DEFN: @__CFConstantStringClassReference = dso_local dllexport global [32 x i32] |
| 36 |
// CHECK-CF: @__CFConstantStringClassReference = external dllimport global [0 x i32] |
| 37 |
// CHECK-CF-EXTERN: @__CFConstantStringClassReference = external dllimport global [0 x i32] |
| 38 |
// CHECK-CF-EXTERN-DLLIMPORT: @__CFConstantStringClassReference = external dllimport global [0 x i32] |
| 39 |
// CHECK-CF-DLLIMPORT: @__CFConstantStringClassReference = external dllimport global [0 x i32] |
| 40 |
|