xref: /llvm-project/llvm/test/Transforms/ThinLTOBitcodeWriter/split-unified.ll (revision a1ca3af31eeec61cfb9d619f55b655b0eb0b9494)
1; Generate bitcode files with split LTO modules
2; RUN: opt -unified-lto -thinlto-bc -thinlto-split-lto-unit -o %t0.bc %s
3; RUN: llvm-dis -o %t3.ll %t0.bc
4; RUN: FileCheck <%t3.ll.0 --check-prefix=M0 %s
5; RUN: FileCheck <%t3.ll.1 --check-prefix=M1 %s
6; RUN: llvm-bcanalyzer -dump %t0.bc | FileCheck --check-prefix=BCA0 %s
7
8; ERROR: llvm-modextract: error: module index out of range; bitcode file contains 1 module(s)
9
10; BCA0: <GLOBALVAL_SUMMARY_BLOCK
11; BCA0: <FULL_LTO_GLOBALVAL_SUMMARY_BLOCK
12; 16 = not eligible to import
13
14$g = comdat any
15
16@g = global i8 42, comdat, !type !0
17
18; M0: define ptr @f()
19define ptr @f() {
20  ret ptr @g
21}
22
23; M1: !0 = !{i32 0, !"typeid"}
24!0 = !{i32 0, !"typeid"}
25