1f4a2713aSLionel Sambuc // RUN: %clang -target i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t 2f4a2713aSLionel Sambuc // RUN: echo 'END' >> %t 3f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s 4f4a2713aSLionel Sambuc 5f4a2713aSLionel Sambuc // EMIT-AST-PHASES: 0: input, 6f4a2713aSLionel Sambuc // EMIT-AST-PHASES: , c 7f4a2713aSLionel Sambuc // EMIT-AST-PHASES: 1: preprocessor, {0}, cpp-output 8f4a2713aSLionel Sambuc // EMIT-AST-PHASES: 2: compiler, {1}, ast 9f4a2713aSLionel Sambuc // EMIT-AST-PHASES-NOT: 3: 10f4a2713aSLionel Sambuc // EMIT-AST-PHASES: END 11f4a2713aSLionel Sambuc 12f4a2713aSLionel Sambuc // RUN: touch %t.ast 13f4a2713aSLionel Sambuc // RUN: %clang -target i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t 14f4a2713aSLionel Sambuc // RUN: echo 'END' >> %t 15f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix COMPILE-AST-PHASES -input-file %t %s 16f4a2713aSLionel Sambuc 17f4a2713aSLionel Sambuc // COMPILE-AST-PHASES: 0: input, 18f4a2713aSLionel Sambuc // COMPILE-AST-PHASES: , ast 19*0a6a1f1dSLionel Sambuc // COMPILE-AST-PHASES: 1: compiler, {0}, ir 20*0a6a1f1dSLionel Sambuc // COMPILE-AST-PHASES: 2: backend, {1}, assembler 21*0a6a1f1dSLionel Sambuc // COMPILE-AST-PHASES: 3: assembler, {2}, object 22*0a6a1f1dSLionel Sambuc // COMPILE-AST-PHASES-NOT: 4: 23f4a2713aSLionel Sambuc // COMPILE-AST-PHASES: END 24f4a2713aSLionel Sambuc 25f4a2713aSLionel Sambuc // FIXME: There is a problem with compiling AST's in that the input language is 26f4a2713aSLionel Sambuc // not available for use by other tools (for example, to automatically add 27f4a2713aSLionel Sambuc // -lstdc++). We may need -x [objective-]c++-ast and all that goodness. :( 28