diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-05-27 10:48:39 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-05-27 10:48:39 +0000 |
commit | 56040b13c08f0480e56b9d27bce4d40a779088bf (patch) | |
tree | d07c1a8c954ebd703ec0708ee8b08bdb3a2037f6 /lib/VMCore/Instructions.cpp | |
parent | 558e0a6004665f3b34c8df4ac980b3bd0d9ff81d (diff) | |
download | external_llvm-56040b13c08f0480e56b9d27bce4d40a779088bf.zip external_llvm-56040b13c08f0480e56b9d27bce4d40a779088bf.tar.gz external_llvm-56040b13c08f0480e56b9d27bce4d40a779088bf.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index e010400..f33e2dd 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -633,15 +633,15 @@ BranchInst::BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore) OperandTraits<BranchInst>::op_end(this) - 1, 1, InsertBefore) { assert(IfTrue != 0 && "Branch destination may not be null!"); - Op<0>() = reinterpret_cast<Value*>(IfTrue); + Op<0>() = IfTrue; } BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore) : TerminatorInst(Type::VoidTy, Instruction::Br, OperandTraits<BranchInst>::op_end(this) - 3, 3, InsertBefore) { - Op<0>() = reinterpret_cast<Value*>(IfTrue); - Op<1>() = reinterpret_cast<Value*>(IfFalse); + Op<0>() = IfTrue; + Op<1>() = IfFalse; Op<2>() = Cond; #ifndef NDEBUG AssertOK(); @@ -653,7 +653,7 @@ BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd) OperandTraits<BranchInst>::op_end(this) - 1, 1, InsertAtEnd) { assert(IfTrue != 0 && "Branch destination may not be null!"); - Op<0>() = reinterpret_cast<Value*>(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<BranchInst>::op_end(this) - 3, 3, InsertAtEnd) { - Op<0>() = reinterpret_cast<Value*>(IfTrue); - Op<1>() = reinterpret_cast<Value*>(IfFalse); + Op<0>() = IfTrue; + Op<1>() = IfFalse; Op<2>() = Cond; #ifndef NDEBUG AssertOK(); |