summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitaa99c94e2a75e86381bcc45de61c11725a1484d6 (patch)
tree5ebc881e76d6c5d15bc2a8240caa9c274da1a3ce /llvm/lib/VMCore/Constants.cpp
parent6f29ad917051349b99d566ddf57add7c60489094 (diff)
downloadbcm5719-llvm-aa99c94e2a75e86381bcc45de61c11725a1484d6.tar.gz
bcm5719-llvm-aa99c94e2a75e86381bcc45de61c11725a1484d6.zip
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. llvm-svn: 85699
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r--llvm/lib/VMCore/Constants.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index e0adf9d2fd5..2d3d71b6863 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud