From aa99c94e2a75e86381bcc45de61c11725a1484d6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 1 Nov 2009 01:27:45 +0000 Subject: 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 --- llvm/lib/Transforms/Utils/ValueMapper.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Transforms/Utils') diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp index 7929eb9ac2b..39331d78169 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp @@ -113,13 +113,8 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) { if (BlockAddress *BA = dyn_cast(C)) { Function *F = cast(MapValue(BA->getFunction(), VM)); - BasicBlock *BB = 0; - if (BA->getBasicBlock()) { - BB = cast_or_null(MapValue(BA->getBasicBlock(),VM)); - BB = BB ? BB : BA->getBasicBlock(); - } - - return VM[V] = BlockAddress::get(F, BB); + BasicBlock *BB = cast_or_null(MapValue(BA->getBasicBlock(),VM)); + return VM[V] = BlockAddress::get(F, BB ? BB : BA->getBasicBlock()); } llvm_unreachable("Unknown type of constant!"); -- cgit v1.2.3