brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · cae1688 Raw
26 lines · c
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -fblocks -emit-llvm -o - %s | FileCheck %s2 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 requirements5 6// 1 for the argument number (1 indexed), 2 for the line number7// 16777218 == 1 << 24 | 28// 33554434 == 2 << 24 | 29// This explains the two magic numbers below, testing that these two arguments10// are numbered correctly. If they are not numbered correctly they may appear11// out of order or not at all (the latter would occur if they were both assigned12// 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 precede the18// test code (as the line number is mangled in with the argument number as shown19// above)20#line 121typedef struct { int array[12]; } BigStruct_t;22BigStruct_t (^a)(int) = ^(int param) {23    BigStruct_t b;24    return b;25};26