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 | b7454fd9df0b477e3daf2fce6e1d5e1b241562df (patch) | |
tree | bb926d40337ccaa32dd4cc1e7318545ec34add08 /lib/VMCore/Function.cpp | |
parent | 2b38c12643236825a6a49c31ef49da8e62b094c2 (diff) | |
download | external_llvm-b7454fd9df0b477e3daf2fce6e1d5e1b241562df.zip external_llvm-b7454fd9df0b477e3daf2fce6e1d5e1b241562df.tar.gz external_llvm-b7454fd9df0b477e3daf2fce6e1d5e1b241562df.tar.bz2 |
Teach Function::hasAddressTaken that BlockAddress doesn't really take
the address of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r-- | lib/VMCore/Function.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index af6344e..9b098a2 100644 --- a/lib/VMCore/Function.cpp +++ b/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)); |