blob: e9fbb068d969ec46ef63edbfb15acd8f241eb4a5 [file] [log] [blame]
Daniel Dunbar5618e982009-12-15 22:01:241// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t
Daniel Dunbar8b576972009-11-08 01:45:362// RUN: echo 'END' >> %t
3// RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s
Daniel Dunbar6cdf83c12009-09-01 16:57:464
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 Dunbar1d9b4532009-09-20 23:35:5210// EMIT-AST-PHASES: END
Daniel Dunbar6cdf83c12009-09-01 16:57:4611
Daniel Dunbar8b576972009-11-08 01:45:3612// RUN: touch %t.ast
Daniel Dunbar5618e982009-12-15 22:01:2413// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t
Daniel Dunbar8b576972009-11-08 01:45:3614// RUN: echo 'END' >> %t
Daniel Dunbar6cdf83c12009-09-01 16:57:4615// 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 Dunbar1d9b4532009-09-20 23:35:5222// COMPILE-AST-PHASES: END
Daniel Dunbar6cdf83c12009-09-01 16:57:4623
24// FIXME: There is a problem with compiling AST's in that the input language is
Chris Lattner57540c52011-04-15 05:22:1825// not available for use by other tools (for example, to automatically add
Daniel Dunbar6cdf83c12009-09-01 16:57:4626// -lstdc++). We may need -x [objective-]c++-ast and all that goodness. :(