From 660a4f389c84c196c983c7bae1f0a02957dc70af Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 1 Nov 2009 04:08:01 +0000 Subject: 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 --- include/llvm/BasicBlock.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index 10f2577..11afa40 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 -- cgit v1.1