1 ; RUN: opt -module-summary %s -o %t1.bc
2 ; RUN: opt -module-summary %S/Inputs/personality.ll -o %t2.bc
4 ; RUN: llvm-lto2 run -o %t.o %t1.bc %t2.bc -save-temps \
5 ; RUN: -r %t2.bc,bar,p \
6 ; RUN: -r %t2.bc,personality_routine,p \
7 ; RUN: -r %t2.bc,personality_routine2,p \
8 ; RUN: -r %t2.bc,personality_routine3,p \
9 ; RUN: -r %t1.bc,foo,p \
10 ; RUN: -r %t1.bc,foo2,p \
11 ; RUN: -r %t1.bc,foo3,p \
12 ; RUN: -r %t1.bc,personality_routine,l \
13 ; RUN: -r %t1.bc,personality_routine2,l \
14 ; RUN: -r %t1.bc,personality_routine3,l \
15 ; RUN: -r %t1.bc,main,xp \
16 ; RUN: -r %t1.bc,bar,l
17 ; RUN: llvm-readobj --symbols %t.o.2 | FileCheck %s --check-prefix=BINDING
20 ; BINDING: Name: personality_routine
21 ; BINDING-NEXT: Value:
23 ; BINDING-NEXT: Binding: Global
24 ; BINDING-NEXT: Type: Function
25 ; BINDING-NEXT: Other [
26 ; BINDING-NEXT: STV_PROTECTED
28 ; BINDING-NEXT: Section: .text
31 ; BINDING-NEXT: Symbol {
32 ; BINDING-NEXT: Name: personality_routine2
33 ; BINDING-NEXT: Value:
35 ; BINDING-NEXT: Binding: Global
36 ; BINDING-NEXT: Type: Function
37 ; BINDING-NEXT: Other [
38 ; BINDING-NEXT: STV_PROTECTED
40 ; BINDING-NEXT: Section: .text
43 ; BINDING-NOT: Name: personality_routine3
45 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
46 target triple = "x86_64-pc-linux-gnu"
48 declare protected i32 @personality_routine(i32, i32, i64, ptr, ptr)
49 declare protected i32 @personality_routine2(i32, i32, i64, ptr, ptr)
50 declare protected i32 @personality_routine3(i32, i32, i64, ptr, ptr)
53 define void @foo() personality ptr @personality_routine {
57 define internal void @foo2b() personality ptr @personality_routine2 {
61 define internal void @foo2a() prologue ptr @foo2b {
65 define void @foo2() prefix ptr @foo2a {
69 define void @foo3() personality ptr @personality_routine3 {