2010-03-30 01:55:58 +08:00
|
|
|
// Test -MT and -E flags, PR4063
|
|
|
|
|
2009-12-16 06:01:24 +08:00
|
|
|
// RUN: %clang -E -o %t.1 %s
|
|
|
|
// RUN: %clang -E -MD -MF %t.d -MT foo -o %t.2 %s
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: diff %t.1 %t.2
|
2013-04-11 21:24:56 +08:00
|
|
|
// RUN: FileCheck -check-prefix=TEST1 %s < %t.d
|
2013-04-11 21:43:19 +08:00
|
|
|
// TEST1: foo:
|
|
|
|
// TEST1: dependencies-and-pp.c
|
2010-03-30 01:55:58 +08:00
|
|
|
|
|
|
|
// Test -MQ flag without quoting
|
|
|
|
|
|
|
|
// RUN: %clang -E -MD -MF %t.d -MQ foo -o %t %s
|
2013-04-11 21:24:56 +08:00
|
|
|
// RUN: FileCheck -check-prefix=TEST2 %s < %t.d
|
|
|
|
// TEST2: foo:
|
2010-03-30 01:55:58 +08:00
|
|
|
|
|
|
|
// Test -MQ flag with quoting
|
|
|
|
|
|
|
|
// RUN: %clang -E -MD -MF %t.d -MQ '$fo\ooo ooo\ ooo\\ ooo#oo' -o %t %s
|
2013-04-11 21:24:56 +08:00
|
|
|
// RUN: FileCheck -check-prefix=TEST3 %s < %t.d
|
|
|
|
// TEST3: $$fo\ooo\ ooo\\\ ooo\\\\\ ooo\#oo:
|
2010-03-30 01:55:58 +08:00
|
|
|
|
|
|
|
// Test consecutive -MT flags
|
|
|
|
|
|
|
|
// RUN: %clang -E -MD -MF %t.d -MT foo -MT bar -MT baz -o %t %s
|
|
|
|
// RUN: diff %t.1 %t
|
2013-04-11 21:24:56 +08:00
|
|
|
// RUN: FileCheck -check-prefix=TEST4 %s < %t.d
|
|
|
|
// TEST4: foo bar baz:
|
2010-03-30 01:55:58 +08:00
|
|
|
|
|
|
|
// Test consecutive -MT and -MQ flags
|
|
|
|
|
|
|
|
// RUN: %clang -E -MD -MF %t.d -MT foo -MQ '$(bar)' -MT 'b az' -MQ 'qu ux' -MQ ' space' -o %t %s
|
2013-04-11 21:24:56 +08:00
|
|
|
// RUN: FileCheck -check-prefix=TEST5 %s < %t.d
|
|
|
|
// TEST5: foo $$(bar) b az qu\ ux \ space:
|
2010-03-30 01:55:58 +08:00
|
|
|
|
|
|
|
// TODO: Test default target without quoting
|
|
|
|
// TODO: Test default target with quoting
|