• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -target i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t
2 // RUN: echo 'END' >> %t
3 // RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s
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:
10 // EMIT-AST-PHASES: END
11 
12 // RUN: touch %t.ast
13 // RUN: %clang -target i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t
14 // RUN: echo 'END' >> %t
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}, ir
20 // COMPILE-AST-PHASES: 2: backend, {1}, assembler
21 // COMPILE-AST-PHASES: 3: assembler, {2}, object
22 // COMPILE-AST-PHASES-NOT: 4:
23 // COMPILE-AST-PHASES: END
24 
25 // FIXME: There is a problem with compiling AST's in that the input language is
26 // not available for use by other tools (for example, to automatically add
27 // -lstdc++). We may need -x [objective-]c++-ast and all that goodness. :(
28