Chris Lattner | 3edbeb7 | 2010-03-29 17:55:58 +0000 | [diff] [blame] | 1 | // Test -MT and -E flags, PR4063 |
| 2 | |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 3 | // RUN: %clang -E -o %t.1 %s |
| 4 | // RUN: %clang -E -MD -MF %t.d -MT foo -o %t.2 %s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 5 | // RUN: diff %t.1 %t.2 |
| 6 | // RUN: grep "foo:" %t.d |
Daniel Dunbar | e5393fb | 2009-05-03 10:04:17 +0000 | [diff] [blame] | 7 | // RUN: grep "dependencies-and-pp.c" %t.d |
Chris Lattner | 3edbeb7 | 2010-03-29 17:55:58 +0000 | [diff] [blame] | 8 | |
| 9 | // Test -MQ flag without quoting |
| 10 | |
| 11 | // RUN: %clang -E -MD -MF %t.d -MQ foo -o %t %s |
| 12 | // RUN: grep "foo:" %t.d |
| 13 | |
| 14 | // Test -MQ flag with quoting |
| 15 | |
| 16 | // RUN: %clang -E -MD -MF %t.d -MQ '$fo\ooo ooo\ ooo\\ ooo#oo' -o %t %s |
| 17 | // RUN: fgrep '$$fo\ooo\ ooo\\\ ooo\\\\\ ooo\#oo:' %t.d |
| 18 | |
| 19 | // Test consecutive -MT flags |
| 20 | |
| 21 | // RUN: %clang -E -MD -MF %t.d -MT foo -MT bar -MT baz -o %t %s |
| 22 | // RUN: diff %t.1 %t |
| 23 | // RUN: fgrep "foo bar baz:" %t.d |
| 24 | |
| 25 | // Test consecutive -MT and -MQ flags |
| 26 | |
| 27 | // RUN: %clang -E -MD -MF %t.d -MT foo -MQ '$(bar)' -MT 'b az' -MQ 'qu ux' -MQ ' space' -o %t %s |
| 28 | // RUN: fgrep 'foo $$(bar) b az qu\ ux \ space:' %t.d |
| 29 | |
| 30 | // TODO: Test default target without quoting |
| 31 | // TODO: Test default target with quoting |