1 // Check to make sure clang is somewhat picky about -g options. 2 // (Delived from debug-options.c) 3 // rdar://10383444 4 // RUN: %clang -### -c -save-temps -integrated-as -g %s 2>&1 \ 5 // RUN: | FileCheck -check-prefix=SAVE %s 6 // 7 // SAVE: "-cc1"{{.*}}"-E"{{.*}}"-debug-info-kind= 8 // SAVE: "-cc1"{{.*}}"-emit-llvm-bc"{{.*}}"-debug-info-kind= 9 // SAVE: "-cc1"{{.*}}"-S"{{.*}}"-debug-info-kind= 10 // SAVE: "-cc1as" 11 // SAVE-NOT: -debug-info-kind= 12 13 // Make sure that '-ggdb0' is not accidentally mistaken for '-g' 14 // RUN: %clang -### -ggdb0 -c -integrated-as -x assembler %s 2>&1 \ 15 // RUN: | FileCheck -check-prefix=GGDB0 %s 16 // 17 // GGDB0: "-cc1as" 18 // GGDB0-NOT: -debug-info-kind= 19 20 // Check to make sure clang with -g on a .s file gets passed. 21 // rdar://9275556 22 // RUN: %clang -### -c -integrated-as -g -x assembler %s 2>&1 \ 23 // RUN: | FileCheck %s 24 // 25 // CHECK: "-cc1as" 26 // CHECK: "-debug-info-kind=limited" 27 28 // Check to make sure clang with -g on a .s file gets passed -dwarf-debug-producer. 29 // rdar://12955296 30 // RUN: %clang -### -c -integrated-as -g -x assembler %s 2>&1 \ 31 // RUN: | FileCheck -check-prefix=P %s 32 // 33 // P: "-cc1as" 34 // P: "-dwarf-debug-producer" 35