1 ; Generate bitcode files with summary, as well as minimized bitcode without
2 ; the debug metadata for the thin link.
3 ; RUN: opt -thinlto-bc -thin-link-bitcode-file=%t.thinlink.bc -o %t.bc %s
4 ; RUN: llvm-dis -o - %t.bc | FileCheck %s
5 ; RUN: llvm-bcanalyzer -dump %t.bc | FileCheck --check-prefix=BCA %s
7 ; Make sure the combined index files produced by both the normal and the
8 ; thin link bitcode files are identical
9 ; RUN: llvm-lto -thinlto -o %t3 %t.bc
10 ; Copy the minimized bitcode to the regular bitcode path so the module
11 ; paths in the index are the same (save and restore the regular bitcode
12 ; for use again further down).
13 ; RUN: mv %t.bc %t.bc.sv
14 ; RUN: cp %t.thinlink.bc %t.bc
15 ; RUN: llvm-lto -thinlto -o %t4 %t.bc
16 ; RUN: mv %t.bc.sv %t.bc
17 ; RUN: diff %t3.thinlto.bc %t4.thinlto.bc
19 ; Try again using -thinlto-action to produce combined index
20 ; RUN: rm -f %t3.thinlto.bc %t4.thinlto.bc
21 ; RUN: llvm-lto -thinlto-action=thinlink -o %t3.thinlto.bc %t.bc
22 ; Copy the minimized bitcode to the regular bitcode path so the module
23 ; paths in the index are the same.
24 ; RUN: cp %t.thinlink.bc %t.bc
25 ; RUN: llvm-lto -thinlto-action=thinlink -o %t4.thinlto.bc %t.bc
26 ; RUN: diff %t3.thinlto.bc %t4.thinlto.bc
28 ; BCA: <GLOBALVAL_SUMMARY_BLOCK
30 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
32 ; CHECK: @g = global i8 42
35 ; CHECK: define void @f()