1 ; Check the linkage types in both the per-module and combined summaries.
2 ; RUN: opt -module-summary %s -o %t.o
3 ; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
4 ; RUN: llvm-lto -thinlto -o %t2 %t.o
5 ; RUN: llvm-bcanalyzer -dump %t2.thinlto.bc | FileCheck %s --check-prefix=COMBINED
7 define private void @private()
8 ; CHECK: <PERMODULE {{.*}} op1=72
9 ; COMBINED-DAG: <COMBINED {{.*}} op2=72
14 define internal void @internal()
15 ; CHECK: <PERMODULE {{.*}} op1=7
16 ; COMBINED-DAG: <COMBINED {{.*}} op2=7
21 define available_externally void @available_externally()
22 ; CHECK: <PERMODULE {{.*}} op1=1
23 ; COMBINED-DAG: <COMBINED {{.*}} op2=1
28 define linkonce void @linkonce()
29 ; CHECK: <PERMODULE {{.*}} op1=2
30 ; COMBINED-DAG: <COMBINED {{.*}} op2=2
35 define weak void @weak()
36 ; CHECK: <PERMODULE {{.*}} op1=4
37 ; COMBINED-DAG: <COMBINED {{.*}} op2=4
42 define linkonce_odr void @linkonce_odr()
43 ; CHECK: <PERMODULE {{.*}} op1=3
44 ; COMBINED-DAG: <COMBINED {{.*}} op2=3
49 define weak_odr void @weak_odr()
50 ; CHECK: <PERMODULE {{.*}} op1=5
51 ; COMBINED-DAG: <COMBINED {{.*}} op2=5
56 define external void @external()
57 ; CHECK: <PERMODULE {{.*}} op1=0
58 ; COMBINED-DAG: <COMBINED {{.*}} op2=0