1; Test combined function index generation for ThinLTO via llvm-lto.
2; RUN: opt -module-summary %s -o %t.o
3; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
4; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o
5; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED
6; RUN: not test -e %t3
7
8; COMBINED: <MODULE_STRTAB_BLOCK
9; COMBINED-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto.ll.tmp{{.*}}.o'
10; COMBINED-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto.ll.tmp{{.*}}.o'
11; COMBINED-NEXT: </MODULE_STRTAB_BLOCK
12; COMBINED-NEXT: <GLOBALVAL_SUMMARY_BLOCK
13; COMBINED-NEXT: <VERSION
14; COMBINED-NEXT: <FLAGS
15; COMBINED-NEXT: <VALUE_GUID op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
16; COMBINED-NEXT: <VALUE_GUID op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
17; COMBINED-NEXT: <COMBINED
18; COMBINED-NEXT: <COMBINED
19; COMBINED-NEXT: <BLOCK_COUNT op0=2/>
20; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK
21
22target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23
24define void @f() {
25entry:
26  ret void
27}
28