diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-09-10 22:38:06 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-09-10 22:38:06 +0000 | 
| commit | 97ff99cdf92b3223ce50bad024301588bd93466a (patch) | |
| tree | b94ba9a6e3cdf02448a31ad94b84adb9c38ed729 /llvm/lib/Transforms | |
| parent | a6834c1331d86d379666e55845fca31beb0542ce (diff) | |
| download | bcm5719-llvm-97ff99cdf92b3223ce50bad024301588bd93466a.tar.gz bcm5719-llvm-97ff99cdf92b3223ce50bad024301588bd93466a.zip | |
Clean up code
llvm-svn: 3664
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/ExprTypeConvert.cpp | 12 | 
1 files changed, 4 insertions, 8 deletions
| diff --git a/llvm/lib/Transforms/ExprTypeConvert.cpp b/llvm/lib/Transforms/ExprTypeConvert.cpp index 22ea6f3935f..f657b03ec57 100644 --- a/llvm/lib/Transforms/ExprTypeConvert.cpp +++ b/llvm/lib/Transforms/ExprTypeConvert.cpp @@ -124,10 +124,8 @@ static Instruction *ConvertMallocToType(MallocInst *MI, const Type *Ty,                                        Expr.Var->getName()+"-off", It);    } -  Instruction *NewI = new MallocInst(AllocTy, Expr.Var, Name); -    assert(AllocTy == Ty); -  return NewI; +  return = new MallocInst(AllocTy, Expr.Var, Name);  } @@ -340,7 +338,6 @@ Value *ConvertExpressionToType(Value *V, const Type *Ty, ValueMapCache &VMC) {    BasicBlock *BB = I->getParent(); -  BasicBlock::InstListType &BIL = BB->getInstList();    std::string Name = I->getName();  if (!Name.empty()) I->setName("");    Instruction *Res;     // Result of conversion @@ -495,7 +492,7 @@ Value *ConvertExpressionToType(Value *V, const Type *Ty, ValueMapCache &VMC) {    assert(Res->getType() == Ty && "Didn't convert expr to correct type!"); -  BIL.insert(I, Res); +  BB->getInstList().insert(I, Res);    // Add the instruction to the expression map    VMC.ExprMap[I] = Res; @@ -871,7 +868,6 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal,    BasicBlock *BB = I->getParent();    assert(BB != 0 && "Instruction not embedded in basic block!"); -  BasicBlock::InstListType &BIL = BB->getInstList();    std::string Name = I->getName();    I->setName("");    Instruction *Res;     // Result of conversion @@ -1159,8 +1155,8 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal,    // stream.    //    BasicBlock::iterator It = I; -  assert(It != BIL.end() && "Instruction not in own basic block??"); -  BIL.insert(It, Res);   // Keep It pointing to old instruction +  assert(It != BB->end() && "Instruction not in own basic block??"); +  BB->getInstList().insert(It, Res);   // Keep It pointing to old instruction    DEBUG(cerr << "COT CREATED: "  << (void*)Res << " " << Res               << "In: " << (void*)I << " " << I << "Out: " << (void*)Res | 

