diff options
Diffstat (limited to 'test/LTO')
-rw-r--r-- | test/LTO/Resolution/X86/empty-bitcode.test | 3 | ||||
-rw-r--r-- | test/LTO/Resolution/X86/mixed_lto.ll | 6 | ||||
-rw-r--r-- | test/LTO/Resolution/X86/multi-thinlto.ll | 6 |
3 files changed, 15 insertions, 0 deletions
diff --git a/test/LTO/Resolution/X86/empty-bitcode.test b/test/LTO/Resolution/X86/empty-bitcode.test new file mode 100644 index 00000000000..c98c54499ef --- /dev/null +++ b/test/LTO/Resolution/X86/empty-bitcode.test @@ -0,0 +1,3 @@ +RUN: llvm-cat -o %t.o +RUN: not llvm-lto2 -o %t2 %t.o 2>&1 | FileCheck %s +CHECK: Bitcode file does not contain any modules diff --git a/test/LTO/Resolution/X86/mixed_lto.ll b/test/LTO/Resolution/X86/mixed_lto.ll index 02e6186a3f5..0302ed990e0 100644 --- a/test/LTO/Resolution/X86/mixed_lto.ll +++ b/test/LTO/Resolution/X86/mixed_lto.ll @@ -13,6 +13,12 @@ ; NM1-DAG: T main ; NM1-DAG: U g +; Do the same test again, but with the regular and thin LTO modules in the same file. +; RUN: llvm-cat -b -o %t4.o %t2.o %t1.o +; RUN: llvm-lto2 -o %t5.o %t4.o -r %t4.o,main,px -r %t4.o,g, -r %t4.o,g,px +; RUN: llvm-nm %t5.o.0 | FileCheck %s --check-prefix=NM0 +; RUN: llvm-nm %t5.o.1 | FileCheck %s --check-prefix=NM1 + target triple = "x86_64-unknown-linux-gnu" define i32 @g() { ret i32 0 diff --git a/test/LTO/Resolution/X86/multi-thinlto.ll b/test/LTO/Resolution/X86/multi-thinlto.ll new file mode 100644 index 00000000000..605c9694ced --- /dev/null +++ b/test/LTO/Resolution/X86/multi-thinlto.ll @@ -0,0 +1,6 @@ +; RUN: opt -module-summary %s -o %t.o +; RUN: llvm-cat -b -o %t2.o %t.o %t.o +; RUN: not llvm-lto2 -o %t3.o %t2.o 2>&1 | FileCheck %s +; CHECK: Expected at most one ThinLTO module per bitcode file + +target triple = "x86_64-unknown-linux-gnu" |