2013-08-24 05:49:00 +08:00
|
|
|
// -flto causes a switch to llvm-bc object files.
|
2009-12-16 06:01:24 +08:00
|
|
|
// RUN: %clang -ccc-print-phases -c %s -flto 2> %t.log
|
2010-06-08 07:28:45 +08:00
|
|
|
// RUN: grep '2: compiler, {1}, lto-bc' %t.log
|
2009-03-25 04:17:30 +08:00
|
|
|
|
2013-08-15 03:45:49 +08:00
|
|
|
// RUN: %clang -ccc-print-phases %s -flto 2> %t.log
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: grep '0: input, ".*lto.c", c' %t.log
|
|
|
|
// RUN: grep '1: preprocessor, {0}, cpp-output' %t.log
|
2010-06-08 07:28:45 +08:00
|
|
|
// RUN: grep '2: compiler, {1}, lto-bc' %t.log
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: grep '3: linker, {2}, image' %t.log
|
2009-03-25 04:17:30 +08:00
|
|
|
|
|
|
|
// llvm-bc and llvm-ll outputs need to match regular suffixes
|
|
|
|
// (unfortunately).
|
2013-08-15 03:45:49 +08:00
|
|
|
// RUN: %clang %s -flto -save-temps -### 2> %t.log
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: grep '"-o" ".*lto\.i" "-x" "c" ".*lto\.c"' %t.log
|
|
|
|
// RUN: grep '"-o" ".*lto\.o" .*".*lto\.i"' %t.log
|
|
|
|
// RUN: grep '".*a.out" .*".*lto\.o"' %t.log
|
2009-03-25 04:17:30 +08:00
|
|
|
|
2013-08-15 03:45:49 +08:00
|
|
|
// RUN: %clang %s -flto -S -### 2> %t.log
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: grep '"-o" ".*lto\.s" "-x" "c" ".*lto\.c"' %t.log
|
2009-03-25 04:17:30 +08:00
|
|
|
|
2013-08-25 22:27:09 +08:00
|
|
|
// RUN: not %clang %s -emit-llvm 2>&1 | FileCheck --check-prefix=LLVM-LINK %s
|
|
|
|
// LLVM-LINK: -emit-llvm cannot be used when linking
|