mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
8f630d9ffc
llvm-svn: 132277
33 lines
502 B
Objective-C
33 lines
502 B
Objective-C
// RUN: %clang -O0 -g %s -c -o %t.o
|
|
// RUN: %clang %t.o -o %t.out -framework Foundation
|
|
// RUN: %test_debuginfo %s %t.out
|
|
// XFAIL: *
|
|
// XTARGET: darwin
|
|
|
|
// DEBUGGER: break 24
|
|
// DEBUGGER: r
|
|
// DEBUGGER: p result
|
|
// CHECK: $1 = 42
|
|
|
|
void doBlock(void (^block)(void))
|
|
{
|
|
block();
|
|
}
|
|
|
|
int I(int n)
|
|
{
|
|
__block int result;
|
|
int i = 2;
|
|
doBlock(^{
|
|
result = n;
|
|
});
|
|
return result + i; /* Check value of 'result' */
|
|
}
|
|
|
|
|
|
int main (int argc, const char * argv[]) {
|
|
return I(42);
|
|
}
|
|
|
|
|