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 6 7define private void @private() 8; CHECK: <PERMODULE {{.*}} op1=8 9; COMBINED-DAG: <COMBINED {{.*}} op2=8 10{ 11 ret void 12} 13 14define internal void @internal() 15; CHECK: <PERMODULE {{.*}} op1=7 16; COMBINED-DAG: <COMBINED {{.*}} op2=7 17{ 18 ret void 19} 20 21define available_externally void @available_externally() 22; CHECK: <PERMODULE {{.*}} op1=1 23; COMBINED-DAG: <COMBINED {{.*}} op2=1 24{ 25 ret void 26} 27 28define linkonce void @linkonce() 29; CHECK: <PERMODULE {{.*}} op1=2 30; COMBINED-DAG: <COMBINED {{.*}} op2=2 31{ 32 ret void 33} 34 35define weak void @weak() 36; CHECK: <PERMODULE {{.*}} op1=4 37; COMBINED-DAG: <COMBINED {{.*}} op2=4 38{ 39 ret void 40} 41 42define linkonce_odr void @linkonce_odr() 43; CHECK: <PERMODULE {{.*}} op1=3 44; COMBINED-DAG: <COMBINED {{.*}} op2=3 45{ 46 ret void 47} 48 49define weak_odr void @weak_odr() 50; CHECK: <PERMODULE {{.*}} op1=5 51; COMBINED-DAG: <COMBINED {{.*}} op2=5 52{ 53 ret void 54} 55 56define external void @external() 57; CHECK: <PERMODULE {{.*}} op1=0 58; COMBINED-DAG: <COMBINED {{.*}} op2=0 59{ 60 ret void 61} 62