1 ; RUN: opt -module-summary -o %t.bc %s
2 ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-BAR
3 ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-BAZ
4 ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-QUX
5 ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-RESOLVER
6 ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-QUUX
7 ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-CORGE
8 ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-GRAULT
9 ; RUN: llvm-lto2 run %t.bc -r %t.bc,foo,px -r %t.bc,bar,px -r %t.bc,baz,px -r %t.bc,qux,px -r %t.bc,grault,px -o %t2
10 ; RUN: llvm-nm %t2.1 | FileCheck %s --check-prefix=CHECK-SYMBOL
15 ; CHECK-SYMBOL: t foo_resolver
16 ; CHECK-SYMBOL: i grault
17 ; CHECK-SYMBOL: i quuz
20 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
21 target triple = "x86_64-unknown-linux-gnu"
22 @foo = ifunc i32 (i32), ptr @foo_resolver
23 ; CHECK-RESOLVER: (name: "foo_resolver"
24 ; CHECK-RESOLVER-SAME: live: 1
25 define internal ptr @foo_resolver() {
29 ; CHECK-BAR: (name: "bar"
30 ; CHECK-BAR-NOT: summaries: (
31 ; CHECK-BAR-SAME: ; guid = {{[0-9]+}}
32 @bar = alias i32 (i32), ptr @foo
34 ; CHECK-BAZ: (name: "baz"
35 ; CHECK-BAZ-NOT: summaries: (
36 ; CHECK-BAZ-SAME: ; guid = {{[0-9]+}}
37 @baz = weak alias i32 (i32), ptr @foo
39 ; CHECK-QUX: (name: "qux"
40 ; CHECK-QUX-NOT: summaries: (
41 ; CHECK-QUX-SAME: ; guid = {{[0-9]+}}
42 @qux = alias i32 (i32), ptr @bar
44 ; CHECK-QUUX: (name: "quux"
45 ; CHECK-QUUX-SAME: live: 1
46 @quux = internal alias ptr (), ptr @foo_resolver
47 @quuz = internal ifunc i32 (i32), ptr @quux
49 ; CHECK-CORGE: (name: "corge"
50 ; CHECK-CORGE-NOT: summaries: (
51 ; CHECK-CORGE-SAME: ; guid = {{[0-9]+}}
52 @corge = internal alias i32 (i32), ptr @quuz
54 ; CHECK-GRAULT: (name: "grault"
55 ; CHECK-GRAULT-NOT: summaries: (
56 ; CHECK-GRAULT-SAME: ; guid = {{[0-9]+}}
57 @grault = alias i32 (i32), ptr @corge