blob: c1d7b1a6d7b0356857c5b10e3f476108926d14ae [file] [log] [blame]
Sebastian Pop422377c2012-01-20 22:01:23 +00001// RUN: %clang -target i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t
Daniel Dunbar8b576972009-11-08 01:45:36 +00002// RUN: echo 'END' >> %t
3// RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s
Daniel Dunbar6cdf83c2009-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 Dunbar1d9b4532009-09-20 23:35:52 +000010// EMIT-AST-PHASES: END
Daniel Dunbar6cdf83c2009-09-01 16:57:46 +000011
Daniel Dunbar8b576972009-11-08 01:45:36 +000012// RUN: touch %t.ast
Sebastian Pop422377c2012-01-20 22:01:23 +000013// RUN: %clang -target i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t
Daniel Dunbar8b576972009-11-08 01:45:36 +000014// RUN: echo 'END' >> %t
Daniel Dunbar6cdf83c2009-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
Bob Wilson23a55f12014-12-21 07:00:00 +000019// 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:
Daniel Dunbar1d9b4532009-09-20 23:35:52 +000023// COMPILE-AST-PHASES: END
Daniel Dunbar6cdf83c2009-09-01 16:57:46 +000024
25// FIXME: There is a problem with compiling AST's in that the input language is
Chris Lattner57540c52011-04-15 05:22:18 +000026// not available for use by other tools (for example, to automatically add
Daniel Dunbar6cdf83c2009-09-01 16:57:46 +000027// -lstdc++). We may need -x [objective-]c++-ast and all that goodness. :(