mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
190dbc4beb
Summary: When recursively extracting a function from a bit code file, include functions mentioned in InvokeInst as well as CallInst Reviewers: loladiro, espindola, volkan Reviewed By: loladiro Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60231 llvm-svn: 357735
40 lines
850 B
LLVM
40 lines
850 B
LLVM
; RUN: llvm-extract -func=a --recursive %s -S | FileCheck --check-prefix=CHECK-AB %s
|
|
; RUN: llvm-extract -func=a --recursive --delete %s -S | FileCheck --check-prefix=CHECK-CD %s
|
|
; RUN: llvm-extract -func=d --recursive %s -S | FileCheck --check-prefix=CHECK-CD %s
|
|
; RUN: llvm-extract -func=e --recursive %s -S | FileCheck --check-prefix=CHECK-CD %s
|
|
|
|
; CHECK-AB: define void @a
|
|
; CHECK-AB: define void @b
|
|
; CHECK-AB-NOT: define void @c
|
|
; CHECK-AB-NOT: define void @d
|
|
|
|
; CHECK-CD-NOT: define void @a
|
|
; CHECK-CD-NOT: define void @b
|
|
; CHECK-CD: define void @c
|
|
; CHECK-CD: define void @d
|
|
|
|
define void @a() {
|
|
call void @b()
|
|
ret void
|
|
}
|
|
|
|
define void @b() {
|
|
ret void
|
|
}
|
|
|
|
define void @c() {
|
|
call void @d()
|
|
ret void
|
|
}
|
|
|
|
define void @d() {
|
|
call void @c()
|
|
ret void
|
|
}
|
|
|
|
define void @e() {
|
|
invoke void @c()
|
|
to label %L unwind label %L
|
|
L:
|
|
ret void
|
|
} |