1 // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -fdeclspec -fobjc-runtime=ios -fobjc-exceptions -S -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap -check-prefix CHECK-IR %s
2 // RUN: %clang_cc1 -triple i686-windows-itanium -fms-extensions -fobjc-runtime=macosx -fdeclspec -fobjc-exceptions -S -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap -check-prefix CHECK-IR %s
3 // RUN: %clang_cc1 -triple i686-windows-itanium -fms-extensions -fobjc-runtime=objfw -fdeclspec -fobjc-exceptions -S -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap -check-prefix CHECK-FW %s
5 // CHECK-IR-DAG: @_objc_empty_cache = external dllimport global %struct._objc_cache
12 // CHECK-IR-DAG: @"OBJC_METACLASS_$_I" = external dllimport global %struct._class_t
13 // CHECK-IR-DAG: @"OBJC_CLASS_$_I" = external dllimport global %struct._class_t
19 // CHECK-IR-DAG: @"OBJC_METACLASS_$_J" = dso_local dllexport global %struct._class_t
20 // CHECK-IR-DAG: @"OBJC_CLASS_$_J" = dso_local dllexport global %struct._class_t
22 // CHECK-FW-DAG: @_OBJC_METACLASS_J = dso_local dllexport global
23 // CHECK-FW-DAG: @_OBJC_CLASS_J = dso_local dllexport global
30 // CHECK-IR-DAG: @"OBJC_IVAR_$_J._ivar" = global i32
35 // CHECK-IR-DAG: @"OBJC_METACLASS_$_K" = dso_local global %struct._class_t
36 // CHECK-IR-DAG: @"OBJC_CLASS_$_K" = dso_local global %struct._class_t
38 // CHECK-FW-DAG: @_OBJC_METACLASS_K = dso_local global
39 // CHECK-FW-DAG: @_OBJC_CLASS_K = dso_local global
46 // CHECK-IR-DAG: @"OBJC_IVAR_$_K._ivar" = global i32
52 // CHECK-IR-DAG: @"OBJC_METACLASS_$_L" = dso_local dllexport global %struct._class_t
53 // CHECK-IR-DAG: @"OBJC_CLASS_$_L" = dso_local dllexport global %struct._class_t
55 // CHECK-FW-DAG: @_OBJC_METACLASS_L = dso_local dllexport global
56 // CHECK-FW-DAG: @_OBJC_CLASS_L = dso_local dllexport global
75 // CHECK-IR-DAG: @"OBJC_IVAR_$_L._none" = global i32
76 // CHECK-IR-DAG: @"OBJC_IVAR_$_L._public" = dllexport global i32
77 // CHECK-IR-DAG: @"OBJC_IVAR_$_L._protected" = dllexport global i32
78 // CHECK-IR-DAG: @"OBJC_IVAR_$_L._package" = global i32
79 // CHECK-IR-DAG: @"OBJC_IVAR_$_L._private" = global i32
88 // CHECK-FW-DAG: @_OBJC_CLASS_M = external dllimport global i32
90 // CHECK-IR-DAG: @"OBJC_IVAR_$_M._ivar" = external dllimport global i32
93 __attribute__((__objc_exception__))
97 // CHECK-FW-DAG: @_OBJC_METACLASS_N = dso_local dllexport global
98 // CHECK-FW-DAG: @_OBJC_CLASS_N = dso_local dllexport global
100 @implementation N : I
103 // CHECK-IR-DAG: @"OBJC_EHTYPE_$_N" = dso_local dllexport global %struct._objc_typeinfo
105 __declspec(dllimport)
106 __attribute__((__objc_exception__))
110 // CHECK-IR-DAG: @"OBJC_EHTYPE_$_O" = external dllimport global %struct._objc_typeinfo
112 __attribute__((__objc_exception__))
116 // CHECK-IR-DAG: @"OBJC_EHTYPE_$_P" = external dso_local global %struct._objc_typeinfo
125 // CHECK-IR-DAG: @"OBJC_IVAR_$_M._ivar" = external dllimport global i32
131 mi->_ivar = (void *)0;
132 @throw(@"CFConstantString");
156 // CHECK-IR-DAG: @OBJC_EHTYPE_id = external dllimport global %struct._objc_typeinfo
157 // CHECK-IR-DAG: @"OBJC_EHTYPE_$_I" = weak global %struct._objc_typeinfo
158 // CHECK-IR-DAG: @"OBJC_EHTYPE_$_K" = weak global %struct._objc_typeinfo
159 // CHECK-IR-DAG: @"OBJC_EHTYPE_$_L" = weak global %struct._objc_typeinfo
160 // CHECK-IR-DAG: @"OBJC_EHTYPE_$_M" = weak global %struct._objc_typeinfo