llvm/test/Bitcode/thinlto-summary-linkage-types.ll
Teresa Johnson f2403fe5b5 [ThinLTO] Renaming of function index to module summary index (NFC)
(Resubmitting after fixing missing file issue)

With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.

A companion clang patch will immediately succeed this patch to reflect
this renaming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263513 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 00:04:37 +00:00

62 lines
1.3 KiB
LLVM

; Check the linkage types in both the per-module and combined summaries.
; RUN: llvm-as -module-summary %s -o %t.o
; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
; RUN: llvm-lto -thinlto -o %t2 %t.o
; RUN: llvm-bcanalyzer -dump %t2.thinlto.bc | FileCheck %s --check-prefix=COMBINED
define private void @private()
; CHECK: <PERMODULE {{.*}} op1=9
; COMBINED-DAG: <COMBINED {{.*}} op1=9
{
ret void
}
define internal void @internal()
; CHECK: <PERMODULE {{.*}} op1=3
; COMBINED-DAG: <COMBINED {{.*}} op1=3
{
ret void
}
define available_externally void @available_externally()
; CHECK: <PERMODULE {{.*}} op1=12
; COMBINED-DAG: <COMBINED {{.*}} op1=12
{
ret void
}
define linkonce void @linkonce()
; CHECK: <PERMODULE {{.*}} op1=18
; COMBINED-DAG: <COMBINED {{.*}} op1=18
{
ret void
}
define weak void @weak()
; CHECK: <PERMODULE {{.*}} op1=16
; COMBINED-DAG: <COMBINED {{.*}} op1=16
{
ret void
}
define linkonce_odr void @linkonce_odr()
; CHECK: <PERMODULE {{.*}} op1=19
; COMBINED-DAG: <COMBINED {{.*}} op1=19
{
ret void
}
define weak_odr void @weak_odr()
; CHECK: <PERMODULE {{.*}} op1=17
; COMBINED-DAG: <COMBINED {{.*}} op1=17
{
ret void
}
define external void @external()
; CHECK: <PERMODULE {{.*}} op1=0
; COMBINED-DAG: <COMBINED {{.*}} op1=0
{
ret void
}