blob: 83dfcc37a9c8ca26414390cc20dc036ab5147716 [file] [log] [blame]
Sebastian Pop9ec60df2012-01-20 22:01:23 +00001// RUN: %clang -target i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: echo 'END' >> %t
3// RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s
Daniel Dunbar5915fbf2009-09-01 16:57:46 +00004
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 Dunbar62d1fc02009-09-20 23:35:52 +000010// EMIT-AST-PHASES: END
Daniel Dunbar5915fbf2009-09-01 16:57:46 +000011
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000012// RUN: touch %t.ast
Sebastian Pop9ec60df2012-01-20 22:01:23 +000013// RUN: %clang -target i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000014// RUN: echo 'END' >> %t
Daniel Dunbar5915fbf2009-09-01 16:57:46 +000015// 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 Dunbar62d1fc02009-09-20 23:35:52 +000022// COMPILE-AST-PHASES: END
Daniel Dunbar5915fbf2009-09-01 16:57:46 +000023
24// FIXME: There is a problem with compiling AST's in that the input language is
Chris Lattnerfc8f0e12011-04-15 05:22:18 +000025// not available for use by other tools (for example, to automatically add
Daniel Dunbar5915fbf2009-09-01 16:57:46 +000026// -lstdc++). We may need -x [objective-]c++-ast and all that goodness. :(