blob: 92b865e8edbf600befb4aef8b6cfb6fc11b6f440 [file] [log] [blame]
NAKAMURA Takumi5a5bb932012-01-12 06:15:01 +00001// Check to make sure clang is somewhat picky about -g options.
2// (Delived from debug-options.c)
3// rdar://10383444
Simon Atanasyane16a8c82012-05-03 13:57:00 +00004// RUN: %clang -### -c -save-temps -integrated-as -g %s 2>&1 \
5// RUN: | FileCheck -check-prefix=SAVE %s
NAKAMURA Takumi5a5bb932012-01-12 06:15:01 +00006//
7// SAVE: "-cc1as"
8// SAVE-NOT: "-g"
9
Douglas Katzman9a2ef282015-09-30 15:55:59 +000010// Make sure that '-ggdb0' is not accidentally mistaken for '-g'
11// RUN: %clang -### -ggdb0 -c -integrated-as -x assembler %s 2>&1 \
12// RUN: | FileCheck -check-prefix=GGDB0 %s
13//
14// GGDB0: "-cc1as"
15// GGDB0-NOT: "-g"
16
NAKAMURA Takumi84a5dfd2011-12-31 02:36:23 +000017// Check to make sure clang with -g on a .s file gets passed.
18// rdar://9275556
Douglas Katzman9a2ef282015-09-30 15:55:59 +000019// RUN: %clang -### -c -integrated-as -g -x assembler %s 2>&1 \
NAKAMURA Takumif8f4c952012-12-11 07:16:15 +000020// RUN: | FileCheck %s
NAKAMURA Takumi84a5dfd2011-12-31 02:36:23 +000021//
NAKAMURA Takumif8f4c952012-12-11 07:16:15 +000022// CHECK: "-cc1as"
23// CHECK: "-g"
Kevin Enderbyae2ec472013-01-17 21:38:06 +000024
25// Check to make sure clang with -g on a .s file gets passed -dwarf-debug-producer.
26// rdar://12955296
Douglas Katzman9a2ef282015-09-30 15:55:59 +000027// RUN: %clang -### -c -integrated-as -g -x assembler %s 2>&1 \
Kevin Enderbyae2ec472013-01-17 21:38:06 +000028// RUN: | FileCheck -check-prefix=P %s
29//
30// P: "-cc1as"
31// P: "-dwarf-debug-producer"