1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -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: !"0x101\00.block_descriptor\0016777218\00{{[0-9]+}}", {{.*}} ; [ DW_TAG_arg_variable ] [.block_descriptor]
15 // CHECK: !"0x101\00param\0033554434\00{{[0-9]+}}", {{.*}} ; [ DW_TAG_arg_variable ] [param]
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