Daniel Dunbar | 5618e98 | 2009-12-15 22:01:24 | [diff] [blame] | 1 | // RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t |
Daniel Dunbar | 8b57697 | 2009-11-08 01:45:36 | [diff] [blame] | 2 | // RUN: echo 'END' >> %t |
| 3 | // RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s |
Daniel Dunbar | 6cdf83c1 | 2009-09-01 16:57:46 | [diff] [blame] | 4 | |
| 5 | // EMIT-AST-PHASES: 0: input, |
| 6 | // EMIT-AST-PHASES: , c |
| 7 | // EMIT-AST-PHASES: 1: preprocessor, {0}, cpp-output |
| 8 | // EMIT-AST-PHASES: 2: compiler, {1}, ast |
| 9 | // EMIT-AST-PHASES-NOT: 3: |
Daniel Dunbar | 1d9b453 | 2009-09-20 23:35:52 | [diff] [blame] | 10 | // EMIT-AST-PHASES: END |
Daniel Dunbar | 6cdf83c1 | 2009-09-01 16:57:46 | [diff] [blame] | 11 | |
Daniel Dunbar | 8b57697 | 2009-11-08 01:45:36 | [diff] [blame] | 12 | // RUN: touch %t.ast |
Daniel Dunbar | 5618e98 | 2009-12-15 22:01:24 | [diff] [blame] | 13 | // RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t |
Daniel Dunbar | 8b57697 | 2009-11-08 01:45:36 | [diff] [blame] | 14 | // RUN: echo 'END' >> %t |
Daniel Dunbar | 6cdf83c1 | 2009-09-01 16:57:46 | [diff] [blame] | 15 | // RUN: FileCheck -check-prefix COMPILE-AST-PHASES -input-file %t %s |
| 16 | |
| 17 | // COMPILE-AST-PHASES: 0: input, |
| 18 | // COMPILE-AST-PHASES: , ast |
| 19 | // COMPILE-AST-PHASES: 1: compiler, {0}, assembler |
| 20 | // COMPILE-AST-PHASES: 2: assembler, {1}, object |
| 21 | // COMPILE-AST-PHASES-NOT: 3: |
Daniel Dunbar | 1d9b453 | 2009-09-20 23:35:52 | [diff] [blame] | 22 | // COMPILE-AST-PHASES: END |
Daniel Dunbar | 6cdf83c1 | 2009-09-01 16:57:46 | [diff] [blame] | 23 | |
| 24 | // FIXME: There is a problem with compiling AST's in that the input language is |
Chris Lattner | 57540c5 | 2011-04-15 05:22:18 | [diff] [blame] | 25 | // not available for use by other tools (for example, to automatically add |
Daniel Dunbar | 6cdf83c1 | 2009-09-01 16:57:46 | [diff] [blame] | 26 | // -lstdc++). We may need -x [objective-]c++-ast and all that goodness. :( |