[llvm-commits] [llvm] r51588 - /llvm/trunk/lib/VMCore/Instructions.cpp
Gabor Greif
ggreif at gmail.com
Tue May 27 03:48:45 PDT 2008
Author: ggreif
Date: Tue May 27 05:48:39 2008
New Revision: 51588
URL: http://llvm.org/viewvc/llvm-project?rev=51588&view=rev
Log:
We have the correct headers included to know that BB isa Value. No reinterpret_cast necessary.
Modified:
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=51588&r1=51587&r2=51588&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Tue May 27 05:48:39 2008
@@ -633,15 +633,15 @@
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 @@
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 @@
: 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();
More information about the llvm-commits
mailing list