mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 14:28:54 -04:00

With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
46 lines
1.3 KiB
C
46 lines
1.3 KiB
C
// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
|
|
// Make sure we do not generate line info for debugging-related frame setup.
|
|
// CHECK: define {{.*}}block_invoke
|
|
// CHECK-NOT: store {{.*}}%struct.__block_descriptor*{{.*}}dbg
|
|
// CHECK: store {{.*}}%struct.__block_descriptor*{{.*}}, align
|
|
// CHECK: ret
|
|
// CHECK: define {{.*}}block_invoke
|
|
// CHECK-NOT: store {{.*}}%struct.__block_descriptor*{{.*}}dbg
|
|
// CHECK: store {{.*}}%struct.__block_descriptor*{{.*}}, align
|
|
// CHECK: ret
|
|
// CHECK: define {{.*}}block_invoke
|
|
// CHECK-NOT: store {{.*}}%struct.__block_descriptor*{{.*}}dbg
|
|
// CHECK: store {{.*}}%struct.__block_descriptor*{{.*}}, align
|
|
// CHECK: ret
|
|
int printf(const char*, ...);
|
|
|
|
static void* _NSConcreteGlobalBlock;
|
|
|
|
|
|
typedef void (^ HelloBlock_t)(const char * name);
|
|
|
|
/* Breakpoint for first Block function. */
|
|
HelloBlock_t helloBlock = ^(const char * name) {
|
|
printf("Hello there, %s!\n", name);
|
|
};
|
|
|
|
/* Breakpoint for second Block function. */
|
|
static HelloBlock_t s_helloBlock = ^(const char * name) {
|
|
printf("Hello there, %s!\n", name);
|
|
};
|
|
|
|
/* Breakpoint for third Block function. */
|
|
int X = 1234;
|
|
int (^CP)(void) = ^{ X = X+1; return X; };
|
|
|
|
int
|
|
main(int argc, char * argv[])
|
|
{
|
|
helloBlock("world");
|
|
s_helloBlock("world");
|
|
|
|
CP();
|
|
printf ("X = %d\n", X);
|
|
return X - 1235;
|
|
}
|