blob: 74a544c1c4b08d6c0ab0774c0f0c861f3f6bc803 [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
NAKAMURA Takumi84a5dfd2011-12-31 02:36:23 +000010// Check to make sure clang with -g on a .s file gets passed.
11// rdar://9275556
12// RUN: touch %t.s
Simon Atanasyane16a8c82012-05-03 13:57:00 +000013// RUN: %clang -### -c -integrated-as -g %t.s 2>&1 \
NAKAMURA Takumif8f4c952012-12-11 07:16:15 +000014// RUN: | FileCheck %s
NAKAMURA Takumi84a5dfd2011-12-31 02:36:23 +000015//
NAKAMURA Takumif8f4c952012-12-11 07:16:15 +000016// CHECK: "-cc1as"
17// CHECK: "-g"
Kevin Enderbyae2ec472013-01-17 21:38:06 +000018
19// Check to make sure clang with -g on a .s file gets passed -dwarf-debug-producer.
20// rdar://12955296
21// RUN: touch %t.s
22// RUN: %clang -### -c -integrated-as -g %t.s 2>&1 \
23// RUN: | FileCheck -check-prefix=P %s
24//
25// P: "-cc1as"
26// P: "-dwarf-debug-producer"