Daniel Dunbar | 6c6424b | 2010-06-07 23:28:45 +0000 | [diff] [blame] | 1 | // -emit-llvm, -flto, and -O4 all cause a switch to llvm-bc object files. |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 2 | // RUN: %clang -ccc-print-phases -c %s -flto 2> %t.log |
Daniel Dunbar | 6c6424b | 2010-06-07 23:28:45 +0000 | [diff] [blame] | 3 | // RUN: grep '2: compiler, {1}, lto-bc' %t.log |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 4 | // RUN: %clang -ccc-print-phases -c %s -O4 2> %t.log |
Daniel Dunbar | 6c6424b | 2010-06-07 23:28:45 +0000 | [diff] [blame] | 5 | // RUN: grep '2: compiler, {1}, lto-bc' %t.log |
Daniel Dunbar | 337a627 | 2009-03-24 20:17:30 +0000 | [diff] [blame] | 6 | |
| 7 | // and -emit-llvm doesn't alter pipeline (unfortunately?). |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 8 | // RUN: %clang -ccc-print-phases %s -emit-llvm 2> %t.log |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 9 | // RUN: grep '0: input, ".*lto.c", c' %t.log |
| 10 | // RUN: grep '1: preprocessor, {0}, cpp-output' %t.log |
Daniel Dunbar | 6c6424b | 2010-06-07 23:28:45 +0000 | [diff] [blame] | 11 | // RUN: grep '2: compiler, {1}, lto-bc' %t.log |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 12 | // RUN: grep '3: linker, {2}, image' %t.log |
Daniel Dunbar | 337a627 | 2009-03-24 20:17:30 +0000 | [diff] [blame] | 13 | |
| 14 | // llvm-bc and llvm-ll outputs need to match regular suffixes |
| 15 | // (unfortunately). |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 16 | // RUN: %clang %s -emit-llvm -save-temps -### 2> %t.log |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 17 | // RUN: grep '"-o" ".*lto\.i" "-x" "c" ".*lto\.c"' %t.log |
| 18 | // RUN: grep '"-o" ".*lto\.o" .*".*lto\.i"' %t.log |
| 19 | // RUN: grep '".*a.out" .*".*lto\.o"' %t.log |
Daniel Dunbar | 337a627 | 2009-03-24 20:17:30 +0000 | [diff] [blame] | 20 | |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 21 | // RUN: %clang %s -emit-llvm -S -### 2> %t.log |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 22 | // RUN: grep '"-o" ".*lto\.s" "-x" "c" ".*lto\.c"' %t.log |
Daniel Dunbar | 337a627 | 2009-03-24 20:17:30 +0000 | [diff] [blame] | 23 | |