diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 46daa61d998..3521ee7b16c 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -591,10 +591,10 @@ ConstantVector::ConstantVector(const VectorType *T, OperandTraits::op_end(this) - V.size(), V.size()) { Use *OL = OperandList; - for (std::vector::const_iterator I = V.begin(), E = V.end(); - I != E; ++I, ++OL) { - Constant *C = *I; - assert(C->getType() == T->getElementType() && + for (std::vector::const_iterator I = V.begin(), E = V.end(); + I != E; ++I, ++OL) { + Constant *C = *I; + assert(C->getType() == T->getElementType() && "Initializer for vector element doesn't match vector element type!"); *OL = C; } @@ -603,10 +603,10 @@ ConstantVector::ConstantVector(const VectorType *T, // ConstantVector accessors. Constant* ConstantVector::get(const VectorType* T, const std::vector& V) { - assert(!V.empty() && "Vectors can't be empty"); - LLVMContext &Context = T->getContext(); - LLVMContextImpl *pImpl = Context.pImpl; - + assert(!V.empty() && "Vectors can't be empty"); + LLVMContext &Context = T->getContext(); + LLVMContextImpl *pImpl = Context.pImpl; + // If this is an all-undef or alll-zero vector, return a // ConstantAggregateZero or UndefValue. Constant *C = V[0]; @@ -1240,7 +1240,7 @@ Constant *ConstantExpr::getFPCast(Constant *C, const Type *Ty) { if (SrcBits == DstBits) return C; // Avoid a useless cast Instruction::CastOps opcode = - (SrcBits > DstBits ? Instruction::FPTrunc : Instruction::FPExt); + (SrcBits > DstBits ? Instruction::FPTrunc : Instruction::FPExt); return getCast(opcode, C, Ty); }