xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/debug-options-as.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // Check to make sure clang is somewhat picky about -g options.
2*f4a2713aSLionel Sambuc // (Delived from debug-options.c)
3*f4a2713aSLionel Sambuc // rdar://10383444
4*f4a2713aSLionel Sambuc // RUN: %clang -### -c -save-temps -integrated-as -g %s 2>&1 \
5*f4a2713aSLionel Sambuc // RUN:   | FileCheck -check-prefix=SAVE %s
6*f4a2713aSLionel Sambuc //
7*f4a2713aSLionel Sambuc // SAVE: "-cc1as"
8*f4a2713aSLionel Sambuc // SAVE-NOT: "-g"
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc // Check to make sure clang with -g on a .s file gets passed.
11*f4a2713aSLionel Sambuc // rdar://9275556
12*f4a2713aSLionel Sambuc // RUN: touch %t.s
13*f4a2713aSLionel Sambuc // RUN: %clang -### -c -integrated-as -g %t.s 2>&1 \
14*f4a2713aSLionel Sambuc // RUN:   | FileCheck %s
15*f4a2713aSLionel Sambuc //
16*f4a2713aSLionel Sambuc // CHECK: "-cc1as"
17*f4a2713aSLionel Sambuc // CHECK: "-g"
18*f4a2713aSLionel Sambuc 
19*f4a2713aSLionel Sambuc // Check to make sure clang with -g on a .s file gets passed -dwarf-debug-producer.
20*f4a2713aSLionel Sambuc // rdar://12955296
21*f4a2713aSLionel Sambuc // RUN: touch %t.s
22*f4a2713aSLionel Sambuc // RUN: %clang -### -c -integrated-as -g %t.s 2>&1 \
23*f4a2713aSLionel Sambuc // RUN:   | FileCheck -check-prefix=P %s
24*f4a2713aSLionel Sambuc //
25*f4a2713aSLionel Sambuc // P: "-cc1as"
26*f4a2713aSLionel Sambuc // P: "-dwarf-debug-producer"
27