summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC')
-rw-r--r--test/CodeGenObjC/class-obj-hidden-visibility.m6
-rw-r--r--test/CodeGenObjC/constant-strings.m2
-rw-r--r--test/CodeGenObjC/continuation-class.m2
-rw-r--r--test/CodeGenObjC/dot-syntax-1.m2
-rw-r--r--test/CodeGenObjC/dot-syntax.m2
-rw-r--r--test/CodeGenObjC/encode-test.m3
-rw-r--r--test/CodeGenObjC/hidden-synthesized-ivar.m13
-rw-r--r--test/CodeGenObjC/hidden-visibility.m2
-rw-r--r--test/CodeGenObjC/hidden.m2
-rw-r--r--test/CodeGenObjC/messages-2.m2
-rw-r--r--test/CodeGenObjC/messages.m6
-rw-r--r--test/CodeGenObjC/metadata_symbols.m2
-rw-r--r--test/CodeGenObjC/newproperty-nested-synthesis-1.m2
-rw-r--r--test/CodeGenObjC/property-getter-dot-syntax.m2
-rw-r--r--test/CodeGenObjC/property.m2
-rw-r--r--test/CodeGenObjC/protocol-definition-hidden-visibility.m19
-rw-r--r--test/CodeGenObjC/sel-as-builtin-type.m23
-rw-r--r--test/CodeGenObjC/undefined-protocol.m6
-rw-r--r--test/CodeGenObjC/variadic-sends.m20
19 files changed, 56 insertions, 62 deletions
diff --git a/test/CodeGenObjC/class-obj-hidden-visibility.m b/test/CodeGenObjC/class-obj-hidden-visibility.m
deleted file mode 100644
index fc4ac12..0000000
--- a/test/CodeGenObjC/class-obj-hidden-visibility.m
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: clang-cc -fvisibility=hidden -triple x86_64-apple-darwin10 -S -o - %s | grep -e "private_extern _OBJC_" | count 2
-
-@interface INTF @end
-
-@implementation INTF @end
-
diff --git a/test/CodeGenObjC/constant-strings.m b/test/CodeGenObjC/constant-strings.m
index 8482376..8204adc 100644
--- a/test/CodeGenObjC/constant-strings.m
+++ b/test/CodeGenObjC/constant-strings.m
@@ -1,6 +1,6 @@
// RUN: clang-cc -emit-llvm -o %t %s
// RUN: clang-cc -fgnu-runtime -emit-llvm -o %t %s && grep NXConstantString %t | count 1
-// RUN: clang-cc -fgnu-runtime -fconstant-string-class=NSConstantString -emit-llvm -o %t %s && grep NSConstantString %t | count 1
+// RUN: clang-cc -fgnu-runtime -fconstant-string-class NSConstantString -emit-llvm -o %t %s && grep NSConstantString %t | count 1
id a = @"Hello World!";
diff --git a/test/CodeGenObjC/continuation-class.m b/test/CodeGenObjC/continuation-class.m
index 305d6c7..c222310 100644
--- a/test/CodeGenObjC/continuation-class.m
+++ b/test/CodeGenObjC/continuation-class.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
@interface Object
- (id)new;
diff --git a/test/CodeGenObjC/dot-syntax-1.m b/test/CodeGenObjC/dot-syntax-1.m
index 6fab039..18b972f 100644
--- a/test/CodeGenObjC/dot-syntax-1.m
+++ b/test/CodeGenObjC/dot-syntax-1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
int printf(const char *, ...);
diff --git a/test/CodeGenObjC/dot-syntax.m b/test/CodeGenObjC/dot-syntax.m
index 348346b..01b7189 100644
--- a/test/CodeGenObjC/dot-syntax.m
+++ b/test/CodeGenObjC/dot-syntax.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
int printf(const char *, ...);
diff --git a/test/CodeGenObjC/encode-test.m b/test/CodeGenObjC/encode-test.m
index 6665cb9..db8470b 100644
--- a/test/CodeGenObjC/encode-test.m
+++ b/test/CodeGenObjC/encode-test.m
@@ -66,12 +66,15 @@ struct Innermost {
@interface Test
{
int ivar;
+ __attribute__((objc_gc(weak))) SEL selector;
}
-(void) test3: (Test* [3] [4])b ;
+- (SEL**) meth : (SEL) arg : (SEL*****) arg1 : (SEL*)arg2 : (SEL**) arg3;
@end
@implementation Test
-(void) test3: (Test* [3] [4])b {}
+- (SEL**) meth : (SEL) arg : (SEL*****) arg1 : (SEL*)arg2 : (SEL**) arg3 {}
@end
struct S { int iS; };
diff --git a/test/CodeGenObjC/hidden-synthesized-ivar.m b/test/CodeGenObjC/hidden-synthesized-ivar.m
deleted file mode 100644
index 50a87cb..0000000
--- a/test/CodeGenObjC/hidden-synthesized-ivar.m
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: clang-cc -fvisibility=hidden -triple x86_64-apple-darwin10 -S -o - %s | grep -e "private_extern _OBJC_IVAR_"
-@interface I
-{
- int P;
-}
-
-@property int P;
-@end
-
-@implementation I
-@synthesize P;
-@end
-
diff --git a/test/CodeGenObjC/hidden-visibility.m b/test/CodeGenObjC/hidden-visibility.m
index 082ee7a..8596b41 100644
--- a/test/CodeGenObjC/hidden-visibility.m
+++ b/test/CodeGenObjC/hidden-visibility.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fvisibility=hidden -fobjc-nonfragile-abi -emit-llvm -o - %s | FileCheck %s
+// RUN: clang-cc -fvisibility hidden -fobjc-nonfragile-abi -emit-llvm -o - %s | FileCheck %s
// CHECK: @"OBJC_IVAR_$_I.P" = hidden
// CHECK: @"OBJC_CLASS_$_I" = hidden
// CHECK: @"OBJC_METACLASS_$_I" = hidden
diff --git a/test/CodeGenObjC/hidden.m b/test/CodeGenObjC/hidden.m
index fd87d99..0c0dbb3 100644
--- a/test/CodeGenObjC/hidden.m
+++ b/test/CodeGenObjC/hidden.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
__attribute__((visibility("hidden")))
@interface Hidden
diff --git a/test/CodeGenObjC/messages-2.m b/test/CodeGenObjC/messages-2.m
index 5cf4d2d..87f7cc6 100644
--- a/test/CodeGenObjC/messages-2.m
+++ b/test/CodeGenObjC/messages-2.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
int printf(const char *, ...);
diff --git a/test/CodeGenObjC/messages.m b/test/CodeGenObjC/messages.m
index ea8809f..ac3b81d 100644
--- a/test/CodeGenObjC/messages.m
+++ b/test/CodeGenObjC/messages.m
@@ -1,8 +1,8 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
// RUN: grep "objc_msgSend" %t | count 6
-// RUN: clang-cc -fgnu-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fgnu-runtime -emit-llvm -o %t %s
// RUN: grep "objc_msg_lookup" %t | count 6
-// RUN: clang-cc -fgnu-runtime -fobjc-nonfragile-abi --emit-llvm -o %t %s
+// RUN: clang-cc -fgnu-runtime -fobjc-nonfragile-abi -emit-llvm -o %t %s
// RUN: grep "objc_msg_lookup_sender" %t | count 6
typedef struct {
diff --git a/test/CodeGenObjC/metadata_symbols.m b/test/CodeGenObjC/metadata_symbols.m
index c608cd4..9cc2296 100644
--- a/test/CodeGenObjC/metadata_symbols.m
+++ b/test/CodeGenObjC/metadata_symbols.m
@@ -10,7 +10,7 @@
// RUN: grep -F 'define internal void @"\01-[A im0]"' %t
// RUN: grep -F 'define internal void @"\01-[A(Cat) im1]"' %t
-// RUN: clang-cc -fobjc-nonfragile-abi -fvisibility=hidden -emit-llvm -o %t %s
+// RUN: clang-cc -fobjc-nonfragile-abi -fvisibility hidden -emit-llvm -o %t %s
// RUN: grep '@"OBJC_METACLASS_$_A" = hidden global .*section "__DATA, __objc_data", align 8' %t
// RUN: grep '@"OBJC_CLASS_$_A" = hidden global .*section "__DATA, __objc_data", align 8' %t
diff --git a/test/CodeGenObjC/newproperty-nested-synthesis-1.m b/test/CodeGenObjC/newproperty-nested-synthesis-1.m
index 4d93198..898c81a 100644
--- a/test/CodeGenObjC/newproperty-nested-synthesis-1.m
+++ b/test/CodeGenObjC/newproperty-nested-synthesis-1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
@interface Object
- (id) new;
diff --git a/test/CodeGenObjC/property-getter-dot-syntax.m b/test/CodeGenObjC/property-getter-dot-syntax.m
index c1cc5e9..8701b58 100644
--- a/test/CodeGenObjC/property-getter-dot-syntax.m
+++ b/test/CodeGenObjC/property-getter-dot-syntax.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
@protocol NSObject
- (void *)description;
diff --git a/test/CodeGenObjC/property.m b/test/CodeGenObjC/property.m
index 59f096f..2ab1054 100644
--- a/test/CodeGenObjC/property.m
+++ b/test/CodeGenObjC/property.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc --emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
int printf(const char *, ...);
diff --git a/test/CodeGenObjC/protocol-definition-hidden-visibility.m b/test/CodeGenObjC/protocol-definition-hidden-visibility.m
deleted file mode 100644
index 31a864b..0000000
--- a/test/CodeGenObjC/protocol-definition-hidden-visibility.m
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -S -o - %s | grep -e "private_extern l_OBJC_PROTOCOL_" | count 2
-
-@interface FOO @end
-
-@interface NSObject @end
-
-@protocol SSHIPCProtocolHandler_BDC;
-
-typedef NSObject<SSHIPCProtocolHandler_BDC> _SSHIPCProtocolHandler_BDC;
-
-@interface SSHIPC_v2_RPFSProxy
-@property(nonatomic,readonly,retain) _SSHIPCProtocolHandler_BDC* protocolHandler_BDC;
-@end
-
-@implementation FOO
-- (_SSHIPCProtocolHandler_BDC*) protocolHandler_BDC {@protocol(SSHIPCProtocolHandler_BDC); }
-@end
-
-
diff --git a/test/CodeGenObjC/sel-as-builtin-type.m b/test/CodeGenObjC/sel-as-builtin-type.m
new file mode 100644
index 0000000..c65a5b2
--- /dev/null
+++ b/test/CodeGenObjC/sel-as-builtin-type.m
@@ -0,0 +1,23 @@
+// RUN: clang-cc -emit-llvm -o %t %s
+// pr5025
+// radar 7405040
+
+typedef const struct objc_selector {
+ void *sel_id;
+ const char *sel_types;
+} *SEL;
+
+@interface I2
++(id) dictionary;
+@end
+
+@implementation I3; // expected-warning {{cannot find interface declaration for 'I3'}}
++(void) initialize {
+ I2 *a0 = [I2 dictionary];
+}
+@end
+
+int func(SEL s1, SEL s2)
+{
+ return s1->sel_id == s2->sel_id;
+}
diff --git a/test/CodeGenObjC/undefined-protocol.m b/test/CodeGenObjC/undefined-protocol.m
new file mode 100644
index 0000000..7fe0790
--- /dev/null
+++ b/test/CodeGenObjC/undefined-protocol.m
@@ -0,0 +1,6 @@
+// RUN: clang-cc -emit-llvm-only -fgnu-runtime %s
+
+@protocol MadeUpProtocol;
+
+@interface Object <MadeUpProtocol> @end
+@implementation Object @end
diff --git a/test/CodeGenObjC/variadic-sends.m b/test/CodeGenObjC/variadic-sends.m
index e2d13e3..ab0beef 100644
--- a/test/CodeGenObjC/variadic-sends.m
+++ b/test/CodeGenObjC/variadic-sends.m
@@ -8,33 +8,33 @@
@end
void f0(A *a) {
- // CHECK-X86-32: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*)*)
- // CHECK-X86-64: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*)*)
+ // CHECK-X86-32: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*)*)
+ // CHECK-X86-64: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*)*)
[a im0];
}
void f1(A *a) {
- // CHECK-X86-32: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*, i32)*)
- // CHECK-X86-64: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*, i32)*)
+ // CHECK-X86-32: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32)*)
+ // CHECK-X86-64: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32)*)
[a im1: 1];
}
void f2(A *a) {
- // CHECK-X86-32: call void (i8*, %struct.objc_selector*, i32, i32, ...)* bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*, i32, i32, ...)*)
- // CHECK-X86-64: call void (i8*, %struct.objc_selector*, i32, i32, ...)* bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*, i32, i32, ...)*)
+ // CHECK-X86-32: call void (i8*, i8*, i32, i32, ...)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32, i32, ...)*)
+ // CHECK-X86-64: call void (i8*, i8*, i32, i32, ...)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32, i32, ...)*)
[a im2: 1, 2];
}
@interface B : A @end
@implementation B : A
-(void) foo {
- // CHECK-X86-32: call void bitcast (i8* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, %struct.objc_selector*, i32)*)
- // CHECK-X86-64: call void bitcast (i8* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, %struct.objc_selector*, i32)*)
+ // CHECK-X86-32: call void bitcast (i8* (%struct._objc_method_description*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32)*)
+ // CHECK-X86-64: call void bitcast (i8* (%struct._objc_method_description*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32)*)
[super im1: 1];
}
-(void) bar {
- // CHECK-X86-32: call void (%struct._objc_super*, %struct.objc_selector*, i32, i32, ...)* bitcast (i8* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, %struct.objc_selector*, i32, i32, ...)*)
- // CHECK-X86-64: call void (%struct._objc_super*, %struct.objc_selector*, i32, i32, ...)* bitcast (i8* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, %struct.objc_selector*, i32, i32, ...)*)
+ // CHECK-X86-32: call void (%struct._objc_method_description*, i8*, i32, i32, ...)* bitcast (i8* (%struct._objc_method_description*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32, i32, ...)*)
+ // CHECK-X86-64: call void (%struct._objc_method_description*, i8*, i32, i32, ...)* bitcast (i8* (%struct._objc_method_description*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32, i32, ...)*)
[super im2: 1, 2];
}
OpenPOWER on IntegriCloud