diff options
author | Jay Foad <jay.foad@gmail.com> | 2012-05-12 08:30:16 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2012-05-12 08:30:16 +0000 |
commit | ca0c4996098068828c7688103cd0a80edf8cba09 (patch) | |
tree | afe6b592c40bc62c7e552b6ebd9cb1b1cc5b8e16 /llvm/lib/VMCore/Function.cpp | |
parent | 8bb9745a5e8fda4a0142bfcde3a61efd9160b8c6 (diff) | |
download | bcm5719-llvm-ca0c4996098068828c7688103cd0a80edf8cba09.tar.gz bcm5719-llvm-ca0c4996098068828c7688103cd0a80edf8cba09.zip |
Teach Function::hasAddressTaken that BlockAddress doesn't really take
the address of a function.
llvm-svn: 156703
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
-rw-r--r-- | llvm/lib/VMCore/Function.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index af6344ef616..9b098a25250 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -400,7 +400,8 @@ Function *Intrinsic::getDeclaration(Module *M, ID id, ArrayRef<Type*> Tys) { bool Function::hasAddressTaken(const User* *PutOffender) const { for (Value::const_use_iterator I = use_begin(), E = use_end(); I != E; ++I) { const User *U = *I; - // FIXME: Check for blockaddress, which does not take the address. + if (isa<BlockAddress>(U)) + continue; if (!isa<CallInst>(U) && !isa<InvokeInst>(U)) return PutOffender ? (*PutOffender = U, true) : true; ImmutableCallSite CS(cast<Instruction>(U)); |