summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-extract/llvm-extract.cpp
diff options
context:
space:
mode:
authorDavid Callahan <dcallahan@fb.com>2019-04-04 23:30:47 +0000
committerDavid Callahan <dcallahan@fb.com>2019-04-04 23:30:47 +0000
commitf498bdcebfa439218e315be74a62ad52db3e2846 (patch)
tree7ce7c0f7a93857d40367d0d089fc5694538aca37 /llvm/tools/llvm-extract/llvm-extract.cpp
parenta6ed16c98f503f5acc912a8f00b74f591f6de951 (diff)
downloadbcm5719-llvm-f498bdcebfa439218e315be74a62ad52db3e2846.tar.gz
bcm5719-llvm-f498bdcebfa439218e315be74a62ad52db3e2846.zip
Include invoke'd functions for recursive extract
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
Diffstat (limited to 'llvm/tools/llvm-extract/llvm-extract.cpp')
-rw-r--r--llvm/tools/llvm-extract/llvm-extract.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-extract/llvm-extract.cpp b/llvm/tools/llvm-extract/llvm-extract.cpp
index 30c89a87439..64674729bf4 100644
--- a/llvm/tools/llvm-extract/llvm-extract.cpp
+++ b/llvm/tools/llvm-extract/llvm-extract.cpp
@@ -270,10 +270,10 @@ int main(int argc, char **argv) {
ExitOnErr(F->materialize());
for (auto &BB : *F) {
for (auto &I : BB) {
- auto *CI = dyn_cast<CallInst>(&I);
- if (!CI)
+ CallBase *CB = dyn_cast<CallBase>(&I);
+ if (!CB)
continue;
- Function *CF = CI->getCalledFunction();
+ Function *CF = CB->getCalledFunction();
if (!CF)
continue;
if (CF->isDeclaration() || GVs.count(CF))
OpenPOWER on IntegriCloud