Home | History | Annotate | Download | only in CodeGenObjC
      1 // RUN: %clang_cc1 -emit-llvm -o %t %s
      2 // RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1
      3 // RUN: %clang_cc1 -DWITHDEF -emit-llvm -o %t %s
      4 // RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1
      5 
      6 id objc_msgSend(int x);
      7 
      8 @interface A @end
      9 
     10 @implementation A
     11 -(void) f0 {
     12   objc_msgSend(12);
     13 }
     14 
     15 -(void) hello {
     16 }
     17 @end
     18 
     19 void f0(id x) {
     20   [x hello];
     21 }
     22 
     23 #ifdef WITHDEF
     24 // This isn't a very good send function.
     25 id objc_msgSend(int x) {
     26   return 0;
     27 }
     28 
     29 // rdar://6800430
     30 void objc_assign_weak(id value, id *location) {
     31 }
     32 
     33 #endif
     34