1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck -check-prefix CHECK-DWARF %s
3 // RUN: %clang_cc1 -triple x86_64-w64-windows-gnu -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck -check-prefix CHECK-MINGW %s
5 // RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck -check-prefix CHECK-MSVC %s
7 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck -check-prefix CHECK-ELF %s
13 -(void)foo:(Z)a : (char*)b : (Z)c : (double) d;
18 -(void)foo:(Z)a: (char*)b : (Z)c : (double) d {}
21 // CHECK-DWARF: private unnamed_addr constant [14 x i8] c"v16@0:8{?=}16
22 // CHECK-DWARF: private unnamed_addr constant [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
24 // CHECK-MINGW: @".objc_sel_types_v16@0:8{?\02}16" = linkonce_odr hidden constant [14 x i8] c"v16@0:8{?=}16\00"
25 // CHECK-MINGW: @".objc_sel_types_v32@0:8{?\02}16*16{?\02}24d24" = linkonce_odr hidden constant [26 x i8] c"v32@0:8{?=}16*16{?=}24d24\00"
27 // CHECK-MSVC: @".objc_sel_types_v20@0:8{?\02}16" = linkonce_odr hidden constant [14 x i8] c"v20@0:8{?=}16\00"
28 // CHECK-MSVC: @".objc_sel_types_v40@0:8{?\02}16*20{?\02}28d32" = linkonce_odr hidden constant [26 x i8] c"v40@0:8{?=}16*20{?=}28d32\00"
30 // CHECK-ELF: @".objc_sel_types_v16\010:8{?=}16" = linkonce_odr hidden constant [14 x i8] c"v16@0:8{?=}16\00"
31 // CHECK-ELF: @".objc_sel_types_v32\010:8{?=}16*16{?=}24d24" = linkonce_odr hidden constant [26 x i8] c"v32@0:8{?=}16*16{?=}24d24\00"
33 @interface NSObject @end
36 typedef BABugExample BABugExampleRedefinition;
38 @interface BABugExample : NSObject {
39 BABugExampleRedefinition *_property; // .asciz "^{BABugExample=^{BABugExample}}"
41 @property (copy) BABugExampleRedefinition *property;
44 @implementation BABugExample
45 @synthesize property = _property;
48 // CHECK-DWARF: private unnamed_addr constant [8 x i8] c"@16
49 // CHECK-MINGW: @".objc_sel_types_@16@0:8" = linkonce_odr hidden constant [8 x i8] c"@16@0:8\00"
50 // CHECK-MSVC: @".objc_sel_types_@16@0:8" = linkonce_odr hidden constant [8 x i8] c"@16@0:8\00"
51 // CHECK-ELF @".objc_sel_types_\0116\010:8" = linkonce_odr hidden constant [8 x i8] c"@16@0:8\00"
54 typedef SCNCamera C3DCamera;
57 C3DCamera *presentationInstance;
63 @implementation SCNCamera
65 C3DCameraStorage _storage;
68 // CHECK-DWARF: private unnamed_addr constant [39 x i8] c"{?=\22presentationInstance\22@\22SCNCamera\22}\00"
69 // CHECK-MINGW: @"__objc_ivar_offset_SCNCamera._storage.{?\02@}"
70 // CHECK-MSVC: @"__objc_ivar_offset_SCNCamera._storage.{?\02@}"
71 // CHECK-ELF: @"__objc_ivar_offset_SCNCamera._storage.{?=\01}"
74 typeof(@encode(typeof(i))) e = @encode(typeof(i));
75 const char * Test(void)
79 // CHECK-DWARF: @e ={{.*}} global [2 x i8] c"i\00", align 1
80 // CHECK-DWARF: define{{.*}} ptr @Test()
81 // CHECK-DWARF: ret ptr @e
83 // CHECK-MSVC: @e = dso_local global [2 x i8] c"i\00", align 1
84 // CHECK-MINGW: @e = dso_local global [2 x i8] c"i\00", align 1
85 // CHECK-ELF: @e = global [2 x i8] c"i\00", align 1