diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-12-14 01:17:59 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-12-14 01:17:59 +0000 |
commit | 08850161ecdeeb7bb1308e8b27ee112152e56727 (patch) | |
tree | ddf95a8bfacc69a7530f32e44c7105887d7c7536 /test/LTO | |
parent | d5f6cc37da95b9a327bf7952993ff4b6e20eaf79 (diff) |
LTO: Add support for multi-module bitcode files.
Differential Revision: https://reviews.llvm.org/D27313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289621 91177308-0d34-0410-b5e6-96231b3b80d8
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" |