[ThinLTO] Handle bitcode without function summary sections gracefully
[oota-llvm.git] / test / tools / gold / X86 / thinlto.ll
1 ; First ensure that the ThinLTO handling in the gold plugin handles
2 ; bitcode without function summary sections gracefully.
3 ; RUN: llvm-as %s -o %t.o
4 ; RUN: llvm-as %p/Inputs/thinlto.ll -o %t2.o
5 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
6 ; RUN:    --plugin-opt=thinlto \
7 ; RUN:    -shared %t.o %t2.o -o %t3
8
9 ; RUN: llvm-as -function-summary %s -o %t.o
10 ; RUN: llvm-as -function-summary %p/Inputs/thinlto.ll -o %t2.o
11
12 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
13 ; RUN:    --plugin-opt=thinlto \
14 ; RUN:    -shared %t.o %t2.o -o %t3
15 ; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED
16 ; RUN: not test -e %t3
17
18 ; COMBINED: <MODULE_STRTAB_BLOCK
19 ; COMBINED-NEXT: <ENTRY {{.*}} record string = '{{.*}}/test/tools/gold/X86/Output/thinlto.ll.tmp{{.*}}.o'
20 ; COMBINED-NEXT: <ENTRY {{.*}} record string = '{{.*}}/test/tools/gold/X86/Output/thinlto.ll.tmp{{.*}}.o'
21 ; COMBINED-NEXT: </MODULE_STRTAB_BLOCK
22 ; COMBINED-NEXT: <FUNCTION_SUMMARY_BLOCK
23 ; COMBINED-NEXT: <COMBINED_ENTRY
24 ; COMBINED-NEXT: <COMBINED_ENTRY
25 ; COMBINED-NEXT: </FUNCTION_SUMMARY_BLOCK
26 ; COMBINED-NEXT: <VALUE_SYMTAB
27 ; COMBINED-NEXT: <COMBINED_FNENTRY {{.*}} record string = '{{f|g}}'
28 ; COMBINED-NEXT: <COMBINED_FNENTRY {{.*}} record string = '{{f|g}}'
29 ; COMBINED-NEXT: </VALUE_SYMTAB
30
31 define void @f() {
32 entry:
33   ret void
34 }