From 4c8b24812ddcd1dedaca343a6d4e76f91f398981 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Wed, 14 Oct 2009 18:03:49 +0000 Subject: Update clang to r84119. --- test/Driver/ast.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/Driver/ast.c (limited to 'test/Driver/ast.c') diff --git a/test/Driver/ast.c b/test/Driver/ast.c new file mode 100644 index 000000000000..814b597bb19f --- /dev/null +++ b/test/Driver/ast.c @@ -0,0 +1,26 @@ +// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t && +// RUN: echo 'END' >> %t && +// RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s && + +// EMIT-AST-PHASES: 0: input, +// EMIT-AST-PHASES: , c +// EMIT-AST-PHASES: 1: preprocessor, {0}, cpp-output +// EMIT-AST-PHASES: 2: compiler, {1}, ast +// EMIT-AST-PHASES-NOT: 3: +// EMIT-AST-PHASES: END + +// RUN: touch %t.ast && +// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t && +// RUN: echo 'END' >> %t && +// RUN: FileCheck -check-prefix COMPILE-AST-PHASES -input-file %t %s + +// COMPILE-AST-PHASES: 0: input, +// COMPILE-AST-PHASES: , ast +// COMPILE-AST-PHASES: 1: compiler, {0}, assembler +// COMPILE-AST-PHASES: 2: assembler, {1}, object +// COMPILE-AST-PHASES-NOT: 3: +// COMPILE-AST-PHASES: END + +// FIXME: There is a problem with compiling AST's in that the input language is +// not availabe for use by other tools (for example, to automatically add +// -lstdc++). We may need -x [objective-]c++-ast and all that goodness. :( -- cgit v1.3