1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -fblocks -emit-llvm -o - %s | FileCheck %s 2 3 // Check that arg numbering is not affected by LLVM IR argument numbering - 4 // since the latter is affected by return-by-out-parameter ABI requirements 5 6 // 1 for the argument number (1 indexed), 2 for the line number 7 // 16777218 == 1 << 24 | 2 8 // 33554434 == 2 << 24 | 2 9 // This explains the two magic numbers below, testing that these two arguments 10 // are numbered correctly. If they are not numbered correctly they may appear 11 // out of order or not at all (the latter would occur if they were both assigned 12 // the same argument number by mistake). 13 14 // CHECK: !DILocalVariable(name: ".block_descriptor", arg: 1,{{.*}}line: 2, 15 // CHECK: !DILocalVariable(name: "param", arg: 2,{{.*}}line: 2, 16 17 // Line directive so we don't have to worry about how many lines preceed the 18 // test code (as the line number is mangled in with the argument number as shown 19 // above) 20 #line 1 21 typedef struct { int array[12]; } BigStruct_t; 22 BigStruct_t (^a)() = ^(int param) { 23 BigStruct_t b; 24 return b; 25 }; 26