mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
f75fdc34a4
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357735 91177308-0d34-0410-b5e6-96231b3b80d8
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
|
|
} |