Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 -std=c++11 -emit-llvm -fblocks -o - -triple x86_64-apple-darwin10 %s | FileCheck %s
      2 // rdar://11343499
      3 
      4 namespace N {
      5   typedef void (^BL)();
      6   int func(BL, BL, BL);
      7 
      8 // CHECK-LABEL: define internal void @_ZN1N8ArrBlockE_block_invoke(
      9 // CHECK-LABEL: define internal void @_ZN1N8ArrBlockE_block_invoke_2(
     10 // CHECK-LABEL: define internal void @_ZN1N8ArrBlockE_block_invoke_3
     11   BL ArrBlock [] = { ^{}, ^{}, ^{} };
     12 
     13 // CHECK-LABEL: define internal void @_ZN1N4ivalE_block_invoke_4(
     14 // CHECK-LABEL: define internal void @_ZN1N4ivalE_block_invoke_5(
     15 // CHECK-LABEL: define internal void @_ZN1N4ivalE_block_invoke_6(
     16   int ival = func(^{}, ^{}, ^{});
     17 
     18 // CHECK-LABEL: define internal void @_ZN1N9gvarlobalE_block_invoke_7(
     19   void (^gvarlobal)(void) = ^{};
     20 
     21   struct S {
     22     BL field = ^{};
     23   };
     24 
     25 // CHECK-LABEL: define internal void @_ZN1N3blfE_block_invoke_8(
     26   S blf;
     27 };
     28