Home | History | Annotate | Download | only in CodeGenObjC
      1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -fobjc-nonfragile-abi -fobjc-runtime-has-arc -o - %s | FileCheck %s
      2 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -emit-llvm -fobjc-nonfragile-abi -fobjc-runtime-has-arc -o - %s | FileCheck %s
      3 // rdar://8881826
      4 // rdar://9412038
      5 
      6 @interface I
      7 {
      8   id ivar;
      9 }
     10 - (id) Meth;
     11 + (id) MyAlloc;;
     12 @end
     13 
     14 @implementation I
     15 - (id) Meth {
     16    @autoreleasepool {
     17       id p = [I MyAlloc];
     18       if (!p)
     19         return ivar;
     20    }
     21   return 0;
     22 }
     23 + (id) MyAlloc {
     24     return 0;
     25 }
     26 @end
     27 
     28 // CHECK: call i8* @objc_autoreleasePoolPush
     29 // CHECK: [[T:%.*]] = load i8** [[A:%.*]]
     30 // CHECK: call void @objc_autoreleasePoolPop
     31