summaryrefslogtreecommitdiff
path: root/include/llvm/BasicBlock.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-01 04:08:01 +0000
committerChris Lattner <sabre@nondot.org>2009-11-01 04:08:01 +0000
commit660a4f389c84c196c983c7bae1f0a02957dc70af (patch)
tree2eae57b9a72b6f2f93f40770d5d3eed468771500 /include/llvm/BasicBlock.h
parentda9c281121537d9823ddeecf7bb15095d95b2722 (diff)
downloadllvm-660a4f389c84c196c983c7bae1f0a02957dc70af.tar.gz
llvm-660a4f389c84c196c983c7bae1f0a02957dc70af.tar.bz2
llvm-660a4f389c84c196c983c7bae1f0a02957dc70af.tar.xz
fix an issue where the verifier would reject a function whose entry
block had its address taken even if the blockaddress was dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/BasicBlock.h')
-rw-r--r--include/llvm/BasicBlock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h
index 10f2577869..11afa40477 100644
--- a/include/llvm/BasicBlock.h
+++ b/include/llvm/BasicBlock.h
@@ -240,6 +240,10 @@ public:
/// hasAddressTaken - returns true if there are any uses of this basic block
/// other than direct branches, switches, etc. to it.
bool hasAddressTaken() const { return SubclassData != 0; }
+
+ /// removeDeadBlockAddress - If there is a blockaddress node for this basic
+ /// block, try to remove it and any dead constant users of it.
+ void removeDeadBlockAddress();
private:
/// AdjustBlockAddressRefCount - BasicBlock stores the number of BlockAddress
/// objects using it. This is almost always 0, sometimes one, possibly but