blob: a13e9dbf93615994d6a5a3f2451e52086c3c1638 [file] [log] [blame]
Shuxin Yang378945b2013-08-14 19:45:49 +00001// -flto, and -O4 all cause a switch to llvm-bc object files.
Daniel Dunbar80737ad2009-12-15 22:01:24 +00002// RUN: %clang -ccc-print-phases -c %s -flto 2> %t.log
Daniel Dunbar6c6424b2010-06-07 23:28:45 +00003// RUN: grep '2: compiler, {1}, lto-bc' %t.log
Daniel Dunbar80737ad2009-12-15 22:01:24 +00004// RUN: %clang -ccc-print-phases -c %s -O4 2> %t.log
Daniel Dunbar6c6424b2010-06-07 23:28:45 +00005// RUN: grep '2: compiler, {1}, lto-bc' %t.log
Daniel Dunbar337a6272009-03-24 20:17:30 +00006
Shuxin Yang378945b2013-08-14 19:45:49 +00007// RUN: %clang -ccc-print-phases %s -flto 2> %t.log
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00008// RUN: grep '0: input, ".*lto.c", c' %t.log
9// RUN: grep '1: preprocessor, {0}, cpp-output' %t.log
Daniel Dunbar6c6424b2010-06-07 23:28:45 +000010// RUN: grep '2: compiler, {1}, lto-bc' %t.log
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000011// RUN: grep '3: linker, {2}, image' %t.log
Daniel Dunbar337a6272009-03-24 20:17:30 +000012
13// llvm-bc and llvm-ll outputs need to match regular suffixes
14// (unfortunately).
Shuxin Yang378945b2013-08-14 19:45:49 +000015// RUN: %clang %s -flto -save-temps -### 2> %t.log
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000016// RUN: grep '"-o" ".*lto\.i" "-x" "c" ".*lto\.c"' %t.log
17// RUN: grep '"-o" ".*lto\.o" .*".*lto\.i"' %t.log
18// RUN: grep '".*a.out" .*".*lto\.o"' %t.log
Daniel Dunbar337a6272009-03-24 20:17:30 +000019
Shuxin Yang378945b2013-08-14 19:45:49 +000020// RUN: %clang %s -flto -S -### 2> %t.log
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000021// RUN: grep '"-o" ".*lto\.s" "-x" "c" ".*lto\.c"' %t.log
Daniel Dunbar337a6272009-03-24 20:17:30 +000022