Home | History | Annotate | Download | only in CodeGenObjC
      1 // RUN: %clang_cc1 -fobjc-nonfragile-abi -fobjc-dispatch-method=mixed -triple i386-apple-darwin10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_NEW_DISPATCH %s
      2 //
      3 // CHECK_NEW_DISPATCH: define void @f0
      4 // CHECK_NEW_DISPATCH: bitcast {{.*}}objc_msgSend_fixup_alloc
      5 // CHECK_NEW_DISPATCH: define void @f1
      6 // CHECK_NEW_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
      7 //
      8 // RUN: %clang_cc1 -fobjc-nonfragile-abi -fobjc-dispatch-method=legacy -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_OLD_DISPATCH %s
      9 //
     10 // CHECK_OLD_DISPATCH: define void @f0
     11 // CHECK_OLD_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
     12 // CHECK_OLD_DISPATCH: define void @f1
     13 // CHECK_OLD_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
     14 
     15 @interface A
     16 +(id) alloc;
     17 -(int) im0;
     18 @end
     19 
     20 void f0(void) {
     21   [A alloc];
     22 }
     23 
     24 void f1(A *a) {
     25   [a im0];
     26 }
     27