diff options
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 995bc40..0ec0cce 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -20,7 +20,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/IR/AbstractCallSite.h" #include "llvm/IR/Argument.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/BasicBlock.h" @@ -1485,18 +1484,12 @@ Optional<Function *> Intrinsic::remangleIntrinsicFunction(Function *F) { } /// hasAddressTaken - returns true if there are any uses of this function -/// other than direct calls or invokes to it. Optionally ignores callback -/// uses. -bool Function::hasAddressTaken(const User **PutOffender, - bool IgnoreCallbackUses) const { +/// other than direct calls or invokes to it. +bool Function::hasAddressTaken(const User* *PutOffender) const { for (const Use &U : uses()) { const User *FU = U.getUser(); if (isa<BlockAddress>(FU)) continue; - - if (IgnoreCallbackUses && AbstractCallSite(&U)) - continue; - const auto *Call = dyn_cast<CallBase>(FU); if (!Call) { if (PutOffender) |