xref: /llvm-project/llvm/test/Transforms/ThinLTOBitcodeWriter/function-alias.ll (revision 9950ea66203849df25352b8db8f4ea108ef47a5a)
1cee313d2SEric Christopher; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t %s
2cee313d2SEric Christopher; RUN: llvm-modextract -n 1 -o - %t | llvm-dis | FileCheck --check-prefix=CHECK1 %s
3cee313d2SEric Christopher
4cee313d2SEric Christophertarget triple = "x86_64-unknown-linux-gnu"
5cee313d2SEric Christopher
6cee313d2SEric Christopherdefine hidden void @Func() !type !0 {
7cee313d2SEric Christopher  ret void
8cee313d2SEric Christopher}
9cee313d2SEric Christopher
10cee313d2SEric Christopher; CHECK1: !aliases = !{![[A1:[0-9]+]], ![[A2:[0-9]+]], ![[A3:[0-9]+]]}
11cee313d2SEric Christopher
12cee313d2SEric Christopher; CHECK1: ![[A1]] = !{!"Alias", !"Func", i8 1, i8 0}
13cee313d2SEric Christopher; CHECK1: ![[A2]] = !{!"Hidden_Alias", !"Func", i8 1, i8 0}
14cee313d2SEric Christopher; CHECK1: ![[A3]] = !{!"Weak_Alias", !"Func", i8 0, i8 1}
15*9950ea66SNikita Popov@Alias = hidden alias void (), ptr @Func
16*9950ea66SNikita Popov@Hidden_Alias = hidden alias void (), ptr @Func
17*9950ea66SNikita Popov@Weak_Alias = weak alias void (), ptr @Func
18cee313d2SEric Christopher
19cee313d2SEric Christopher@Variable = global i32 0
20cee313d2SEric Christopher
21cee313d2SEric Christopher; Only generate summary alias information for aliases to functions
22cee313d2SEric Christopher; CHECK1-NOT: Variable_Alias
23*9950ea66SNikita Popov@Variable_Alias = alias i32, ptr @Variable
24cee313d2SEric Christopher
25cee313d2SEric Christopher!0 = !{i64 0, !"_ZTSFvvE"}
26