xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/attr-exception.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fexceptions -fobjc-exceptions -o - %s | FileCheck %s
2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fexceptions -fobjc-exceptions -fvisibility hidden -o - %s | FileCheck -check-prefix=CHECK-HIDDEN %s
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc__attribute__((objc_root_class))
5*f4a2713aSLionel Sambuc@interface Root {
6*f4a2713aSLionel Sambuc  Class isa;
7*f4a2713aSLionel Sambuc}
8*f4a2713aSLionel Sambuc@end
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc__attribute__((objc_exception))
11*f4a2713aSLionel Sambuc@interface A : Root
12*f4a2713aSLionel Sambuc@end
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc@implementation A
15*f4a2713aSLionel Sambuc@end
16*f4a2713aSLionel Sambuc// CHECK: @"OBJC_EHTYPE_$_A" = global {{%.*}} { i8** getelementptr (i8** @objc_ehtype_vtable, i32 2)
17*f4a2713aSLionel Sambuc// CHECK-HIDDEN: @"OBJC_EHTYPE_$_A" = hidden global {{%.*}} { i8** getelementptr (i8** @objc_ehtype_vtable, i32 2)
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambuc__attribute__((objc_exception))
20*f4a2713aSLionel Sambuc__attribute__((visibility("default")))
21*f4a2713aSLionel Sambuc@interface B : Root
22*f4a2713aSLionel Sambuc@end
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc@implementation B
25*f4a2713aSLionel Sambuc@end
26*f4a2713aSLionel Sambuc// CHECK: @"OBJC_EHTYPE_$_B" = global {{%.*}} { i8** getelementptr (i8** @objc_ehtype_vtable, i32 2)
27*f4a2713aSLionel Sambuc// CHECK-HIDDEN: @"OBJC_EHTYPE_$_B" = global {{%.*}} { i8** getelementptr (i8** @objc_ehtype_vtable, i32 2)
28