From b833fd982de0a54eecfb59356d922aaaf688a48d Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 11 Sep 2015 21:24:40 +0000 Subject: [PATCH] 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! llvm-svn: 247477 --- clang/test/CodeGenObjCXX/selector-expr-lvalue.mm | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/clang/test/CodeGenObjCXX/selector-expr-lvalue.mm b/clang/test/CodeGenObjCXX/selector-expr-lvalue.mm index 508ea83..bd72686 100644 --- a/clang/test/CodeGenObjCXX/selector-expr-lvalue.mm +++ b/clang/test/CodeGenObjCXX/selector-expr-lvalue.mm @@ -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 -@interface NSObject {} -- (void)respondsToSelector:(const SEL&)s : (SEL*)s1; -- (void) setPriority:(int)p; +// CHECK: @[[setprioname:[^ ]*]] = {{.*}}"setPriority: +// CHECK-NEXT: @[[setpriosel:[^ ]*]] = {{.*}}getelementptr{{.*}}[[setprioname]] +@interface NSObject +- (void)respondsToSelector:(const SEL &)s ps:(SEL *)s1; +- (void)setPriority:(int)p; - (void)Meth; @end -@implementation NSObject +@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 -- 2.7.4