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
This commit is contained in:
Chris Lattner
2009-11-01 04:08:01 +00:00
parent da9c281121
commit 660a4f389c
3 changed files with 19 additions and 2 deletions

View File

@@ -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