2012-01-12 14:15:01 +08:00
|
|
|
// Check to make sure clang is somewhat picky about -g options.
|
|
|
|
// (Delived from debug-options.c)
|
|
|
|
// rdar://10383444
|
2012-05-03 21:57:00 +08:00
|
|
|
// RUN: %clang -### -c -save-temps -integrated-as -g %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=SAVE %s
|
2012-01-12 14:15:01 +08:00
|
|
|
//
|
2015-10-08 12:24:12 +08:00
|
|
|
// SAVE: "-cc1"{{.*}}"-E"{{.*}}"-debug-info-kind=
|
|
|
|
// SAVE: "-cc1"{{.*}}"-emit-llvm-bc"{{.*}}"-debug-info-kind=
|
|
|
|
// SAVE: "-cc1"{{.*}}"-S"{{.*}}"-debug-info-kind=
|
2012-01-12 14:15:01 +08:00
|
|
|
// SAVE: "-cc1as"
|
2015-10-08 12:24:12 +08:00
|
|
|
// SAVE-NOT: -debug-info-kind=
|
2012-01-12 14:15:01 +08:00
|
|
|
|
2015-09-30 23:55:59 +08:00
|
|
|
// Make sure that '-ggdb0' is not accidentally mistaken for '-g'
|
|
|
|
// RUN: %clang -### -ggdb0 -c -integrated-as -x assembler %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=GGDB0 %s
|
|
|
|
//
|
|
|
|
// GGDB0: "-cc1as"
|
2015-10-08 12:24:12 +08:00
|
|
|
// GGDB0-NOT: -debug-info-kind=
|
2015-09-30 23:55:59 +08:00
|
|
|
|
2011-12-31 10:36:23 +08:00
|
|
|
// Check to make sure clang with -g on a .s file gets passed.
|
|
|
|
// rdar://9275556
|
2015-09-30 23:55:59 +08:00
|
|
|
// RUN: %clang -### -c -integrated-as -g -x assembler %s 2>&1 \
|
2012-12-11 15:16:15 +08:00
|
|
|
// RUN: | FileCheck %s
|
2011-12-31 10:36:23 +08:00
|
|
|
//
|
2012-12-11 15:16:15 +08:00
|
|
|
// CHECK: "-cc1as"
|
2015-10-08 12:24:12 +08:00
|
|
|
// CHECK: "-debug-info-kind=limited"
|
2013-01-18 05:38:06 +08:00
|
|
|
|
|
|
|
// Check to make sure clang with -g on a .s file gets passed -dwarf-debug-producer.
|
|
|
|
// rdar://12955296
|
2015-09-30 23:55:59 +08:00
|
|
|
// RUN: %clang -### -c -integrated-as -g -x assembler %s 2>&1 \
|
2013-01-18 05:38:06 +08:00
|
|
|
// RUN: | FileCheck -check-prefix=P %s
|
|
|
|
//
|
|
|
|
// P: "-cc1as"
|
|
|
|
// P: "-dwarf-debug-producer"
|