aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-01 01:27:45 +0000
committerChris Lattner <sabre@nondot.org>2009-11-01 01:27:45 +0000
commitcdfc940912d56a63b6f12eaa7f3faf79cf74c693 (patch)
treed726a0bce552dab388c526c707aa0b88455241e5 /lib/VMCore/Constants.cpp
parentde17fb6e4dd8f169f707d58d4e124c8d4d2c7dba (diff)
Revert 85678/85680. The decision is to stay with the current form of
indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r--lib/VMCore/Constants.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index e0adf9d2fd..2d3d71b686 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -1045,7 +1045,7 @@ BlockAddress::BlockAddress(Function *F, BasicBlock *BB)
&Op<0>(), 2) {
Op<0>() = F;
Op<1>() = BB;
- if (BB) BB->AdjustBlockAddressRefCount(1);
+ BB->AdjustBlockAddressRefCount(1);
}
@@ -1054,8 +1054,7 @@ BlockAddress::BlockAddress(Function *F, BasicBlock *BB)
void BlockAddress::destroyConstant() {
getFunction()->getType()->getContext().pImpl
->BlockAddresses.erase(std::make_pair(getFunction(), getBasicBlock()));
- if (BasicBlock *BB = getBasicBlock())
- BB->AdjustBlockAddressRefCount(-1);
+ getBasicBlock()->AdjustBlockAddressRefCount(-1);
destroyConstantImpl();
}