From: Gabor Greif Date: Tue, 27 May 2008 10:48:39 +0000 (+0000) Subject: We have the correct headers included to know that BB isa Value. No reinterpret_cast... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9a6246c7349e4f09af794d889d23fd3de9a9aac4;p=oota-llvm.git We have the correct headers included to know that BB isa Value. No reinterpret_cast necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51588 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index e0104001cf7..f33e2dd449a 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -633,15 +633,15 @@ BranchInst::BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore) OperandTraits::op_end(this) - 1, 1, InsertBefore) { assert(IfTrue != 0 && "Branch destination may not be null!"); - Op<0>() = reinterpret_cast(IfTrue); + Op<0>() = IfTrue; } BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore) : TerminatorInst(Type::VoidTy, Instruction::Br, OperandTraits::op_end(this) - 3, 3, InsertBefore) { - Op<0>() = reinterpret_cast(IfTrue); - Op<1>() = reinterpret_cast(IfFalse); + Op<0>() = IfTrue; + Op<1>() = IfFalse; Op<2>() = Cond; #ifndef NDEBUG AssertOK(); @@ -653,7 +653,7 @@ BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd) OperandTraits::op_end(this) - 1, 1, InsertAtEnd) { assert(IfTrue != 0 && "Branch destination may not be null!"); - Op<0>() = reinterpret_cast(IfTrue); + Op<0>() = IfTrue; } BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, @@ -661,8 +661,8 @@ BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, : TerminatorInst(Type::VoidTy, Instruction::Br, OperandTraits::op_end(this) - 3, 3, InsertAtEnd) { - Op<0>() = reinterpret_cast(IfTrue); - Op<1>() = reinterpret_cast(IfFalse); + Op<0>() = IfTrue; + Op<1>() = IfFalse; Op<2>() = Cond; #ifndef NDEBUG AssertOK();