diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-30 23:11:26 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-30 23:11:26 +0000 |
commit | 03e205031b08669f05c41eed5b896fc94c4a12bb (patch) | |
tree | d808fa7cc70a38ffaf1fef006c510c0321b08173 /lib/CodeGen/CGExprScalar.cpp | |
parent | 754431107b61a0523df5271c2876a73dd5a051e9 (diff) |
Update for LLVM API changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 59f5c83e30..dd163a988e 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -200,7 +200,7 @@ public: const llvm::Type *ElementType = VType->getElementType(); // Emit individual vector element stores. - llvm::Value *V = VMContext.getUndef(VType); + llvm::Value *V = llvm::UndefValue::get(VType); // Emit initializers unsigned i; @@ -473,7 +473,7 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType, llvm::Value *Elt = EmitScalarConversion(Src, SrcType, EltTy); // Insert the element in element zero of an undef vector - llvm::Value *UnV = VMContext.getUndef(DstTy); + llvm::Value *UnV = llvm::UndefValue::get(DstTy); llvm::Value *Idx = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0); UnV = Builder.CreateInsertElement(UnV, Elt, Idx, "tmp"); @@ -552,7 +552,7 @@ Value *ScalarExprEmitter::VisitExpr(Expr *E) { CGF.ErrorUnsupported(E, "scalar expression"); if (E->getType()->isVoidType()) return 0; - return VMContext.getUndef(CGF.ConvertType(E->getType())); + return llvm::UndefValue::get(CGF.ConvertType(E->getType())); } Value *ScalarExprEmitter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) { @@ -875,7 +875,7 @@ Value *ScalarExprEmitter::EmitCompoundAssign(const CompoundAssignOperator *E, // (Note that we do actually need the imaginary part of the RHS for // multiplication and division.) CGF.ErrorUnsupported(E, "complex compound assignment"); - return VMContext.getUndef(CGF.ConvertType(E->getType())); + return llvm::UndefValue::get(CGF.ConvertType(E->getType())); } // Emit the RHS first. __block variables need to have the rhs evaluated @@ -1612,7 +1612,7 @@ Value *CodeGenFunction::EmitShuffleVector(Value* V1, Value *V2, ...) { llvm::Value *CodeGenFunction::EmitVector(llvm::Value * const *Vals, unsigned NumVals, bool isSplat) { llvm::Value *Vec - = VMContext.getUndef(llvm::VectorType::get(Vals[0]->getType(), NumVals)); + = llvm::UndefValue::get(llvm::VectorType::get(Vals[0]->getType(), NumVals)); for (unsigned i = 0, e = NumVals; i != e; ++i) { llvm::Value *Val = isSplat ? Vals[0] : Vals[i]; |