blob: 26ff710baa058e99eb480fa3be838ecfffb667b2 [file] [log] [blame]
Daniel Dunbar83dd21f2009-03-13 17:57:10 +00001// Basic compilation for various types of files.
2// RUN: clang-driver -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c %s -x objective-c %s -x c++ %s -x objective-c++ -x assembler %s -x assembler-with-cpp %s -x none %s &> %t &&
3// RUN: grep -F '0: input, "phases.c", c' %t &&
4// RUN: grep -F '1: preprocessor, {0}, cpp-output' %t &&
5// RUN: grep -F '2: compiler, {1}, assembler' %t &&
6// RUN: grep -F '3: assembler, {2}, object' %t &&
7// RUN: grep -F '4: input, "phases.c", objective-c' %t &&
8// RUN: grep -F '5: preprocessor, {4}, objective-c-cpp-output' %t &&
9// RUN: grep -F '6: compiler, {5}, assembler' %t &&
10// RUN: grep -F '7: assembler, {6}, object' %t &&
11// RUN: grep -F '8: input, "phases.c", c++' %t &&
12// RUN: grep -F '9: preprocessor, {8}, c++-cpp-output' %t &&
13// RUN: grep -F '10: compiler, {9}, assembler' %t &&
14// RUN: grep -F '11: assembler, {10}, object' %t &&
15// RUN: grep -F '12: input, "phases.c", assembler' %t &&
16// RUN: grep -F '13: assembler, {12}, object' %t &&
17// RUN: grep -F '14: input, "phases.c", assembler-with-cpp' %t &&
18// RUN: grep -F '15: preprocessor, {14}, assembler' %t &&
19// RUN: grep -F '16: assembler, {15}, object' %t &&
20// RUN: grep -F '17: input, "phases.c", c' %t &&
21// RUN: grep -F '18: preprocessor, {17}, cpp-output' %t &&
22// RUN: grep -F '19: compiler, {18}, assembler' %t &&
23// RUN: grep -F '20: assembler, {19}, object' %t &&
24// RUN: grep -F '21: linker, {3, 7, 11, 13, 16, 20}, image' %t &&
25
Daniel Dunbar83df91b2009-03-13 20:45:03 +000026// Universal linked image.
27// RUN: clang-driver -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -x c %s -arch ppc -arch i386 &> %t &&
28// RUN: grep -F '0: input, "phases.c", c' %t &&
29// RUN: grep -F '1: preprocessor, {0}, cpp-output' %t &&
30// RUN: grep -F '2: compiler, {1}, assembler' %t &&
31// RUN: grep -F '3: assembler, {2}, object' %t &&
32// RUN: grep -F '4: linker, {3}, image' %t &&
33// RUN: grep -F '5: bind-arch, "ppc", {4}, image' %t &&
34// RUN: grep -F '6: bind-arch, "i386", {4}, image' %t &&
35// RUN: grep -F '7: lipo, {5, 6}, image' %t &&
36
37// Universal object file.
38// RUN: clang-driver -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x c %s -arch ppc -arch i386 &> %t &&
39// RUN: grep -F '0: input, "phases.c", c' %t &&
40// RUN: grep -F '1: preprocessor, {0}, cpp-output' %t &&
41// RUN: grep -F '2: compiler, {1}, assembler' %t &&
42// RUN: grep -F '3: assembler, {2}, object' %t &&
43// RUN: grep -F '4: bind-arch, "ppc", {3}, object' %t &&
44// RUN: grep -F '5: bind-arch, "i386", {3}, object' %t &&
45// RUN: grep -F '6: lipo, {4, 5}, object' %t &&
46
Daniel Dunbar83dd21f2009-03-13 17:57:10 +000047// RUN: true