r247477 - Let selector-expr-lvalue.mm actually test something.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 14:24:41 PDT 2015


Author: nico
Date: Fri Sep 11 16:24:40 2015
New Revision: 247477

URL: http://llvm.org/viewvc/llvm-project?rev=247477&view=rev
Log:
Let selector-expr-lvalue.mm actually test something.

I accidentally introduced a bug locally, and noticed that none of the tests
caught it. No longer!

Modified:
    cfe/trunk/test/CodeGenObjCXX/selector-expr-lvalue.mm

Modified: cfe/trunk/test/CodeGenObjCXX/selector-expr-lvalue.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/selector-expr-lvalue.mm?rev=247477&r1=247476&r2=247477&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/selector-expr-lvalue.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/selector-expr-lvalue.mm Fri Sep 11 16:24:40 2015
@@ -1,16 +1,23 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5  -emit-llvm -o - %s 
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5  -emit-llvm -o - %s | FileCheck %s
 // PR7390
 
- at interface NSObject {}
-- (void)respondsToSelector:(const SEL&)s : (SEL*)s1;
-- (void) setPriority:(int)p;
+// CHECK: @[[setprioname:[^ ]*]] = {{.*}}"setPriority:
+// CHECK-NEXT: @[[setpriosel:[^ ]*]] = {{.*}}getelementptr{{.*}}[[setprioname]]
+ at interface NSObject
+- (void)respondsToSelector:(const SEL &)s ps:(SEL *)s1;
+- (void)setPriority:(int)p;
 - (void)Meth;
 @end
 
- at implementation  NSObject
+ at implementation NSObject
+
+// CHECK-LABEL: define internal void @"\01-[NSObject Meth]"(
 - (void)Meth {
-    [self respondsToSelector:@selector(setPriority:) : &@selector(setPriority:)];
+// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8**, i8**)*){{.*}}, i8** @[[setpriosel]])
+  [self respondsToSelector:@selector(setPriority:) ps:&@selector(setPriority:)];
+}
+- (void)setPriority:(int)p {
+}
+- (void)respondsToSelector:(const SEL &)s ps:(SEL *)s1 {
 }
-- (void) setPriority:(int)p{}
-- (void)respondsToSelector:(const SEL&)s : (SEL*)s1 {}
 @end




More information about the cfe-commits mailing list