; RUN: opt -module-summary %s -o %t1.bc ; RUN: opt -module-summary %p/Inputs/distributed_indexes.ll -o %t2.bc ; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t1.bc %t2.bc ; RUN: llvm-lto -thinlto-action=distributedindexes -thinlto-index %t.index.bc %t1.bc %t2.bc ; RUN: llvm-bcanalyzer -dump %t1.bc.thinlto.bc | FileCheck %s --check-prefix=BACKEND1 ; RUN: llvm-bcanalyzer -dump %t2.bc.thinlto.bc | FileCheck %s --check-prefix=BACKEND2 ; The backend index for this module contains summaries from itself and ; Inputs/distributed_indexes.ll, as it imports from the latter. ; We should import @g and alias @analias. While we don't import the aliasee ; directly (and therefore don't have a third COMBINED_PROFILE record from module ; id 1), we will have a VALUE_GUID for it (hence the 4 VALUE_GUID entries). ; BACKEND1: &1 | FileCheck %s --check-prefix=IR ; Tests that analias definition is imported. ; IR: define available_externally void @analias target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" declare void @g(...) declare void @analias(...) define void @f() { entry: call void (...) @g() call void (...) @analias() ret void } ; Ensure we don't get a COMBINED_ORIGINAL_NAME record in the distributed index. ; The BACKEND1-NEXT checks would fail if we did. define internal void @x() { ret void }