diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-30 22:33:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-30 22:33:29 +0000 |
commit | 3821176b2eb9fe5e66929f3df6f204fa6cb2e4d6 (patch) | |
tree | 3dc967f7b4c55152dddb6a5e1fdad3bd3a168a84 /lib/VMCore/BasicBlock.cpp | |
parent | 57f224a5a473462f85e94c457c7548af27c37f0b (diff) |
make hasAddressTaken() constant time by storing a refcount in BB's subclass data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/BasicBlock.cpp')
-rw-r--r-- | lib/VMCore/BasicBlock.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index ede2d12451..e8069c0f05 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -278,11 +278,3 @@ BasicBlock *BasicBlock::splitBasicBlock(iterator I, const Twine &BBName) { return New; } -/// hasAddressTaken - returns true if there are any uses of this basic block -/// other than direct branches, switches, etc. to it. -bool BasicBlock::hasAddressTaken() const { - for (Value::use_const_iterator I = use_begin(), E = use_end(); I != E; ++I) - if (isa<BlockAddress>(*I)) - return true; - return false; -} |