Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77722 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp
index 36771dd..f8e125a 100644
--- a/lib/CodeGen/CGExprComplex.cpp
+++ b/lib/CodeGen/CGExprComplex.cpp
@@ -182,14 +182,14 @@
assert(E->getType()->isAnyComplexType() && "Expected complex type!");
QualType Elem = E->getType()->getAsComplexType()->getElementType();
llvm::Constant *Null =
- CGF.getLLVMContext().getNullValue(CGF.ConvertType(Elem));
+ llvm::Constant::getNullValue(CGF.ConvertType(Elem));
return ComplexPairTy(Null, Null);
}
ComplexPairTy VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) {
assert(E->getType()->isAnyComplexType() && "Expected complex type!");
QualType Elem = E->getType()->getAsComplexType()->getElementType();
llvm::Constant *Null =
- CGF.getLLVMContext().getNullValue(CGF.ConvertType(Elem));
+ llvm::Constant::getNullValue(CGF.ConvertType(Elem));
return ComplexPairTy(Null, Null);
}
@@ -315,7 +315,7 @@
VisitImaginaryLiteral(const ImaginaryLiteral *IL) {
llvm::Value *Imag = CGF.EmitScalarExpr(IL->getSubExpr());
return
- ComplexPairTy(CGF.getLLVMContext().getNullValue(Imag->getType()), Imag);
+ ComplexPairTy(llvm::Constant::getNullValue(Imag->getType()), Imag);
}
@@ -362,7 +362,7 @@
Elt = CGF.EmitScalarConversion(Elt, Op->getType(), DestTy);
// Return (realval, 0).
- return ComplexPairTy(Elt, CGF.getLLVMContext().getNullValue(Elt->getType()));
+ return ComplexPairTy(Elt, llvm::Constant::getNullValue(Elt->getType()));
}
ComplexPairTy ComplexExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
@@ -696,7 +696,7 @@
// Empty init list intializes to null
QualType Ty = E->getType()->getAsComplexType()->getElementType();
const llvm::Type* LTy = CGF.ConvertType(Ty);
- llvm::Value* zeroConstant = CGF.getLLVMContext().getNullValue(LTy);
+ llvm::Value* zeroConstant = llvm::Constant::getNullValue(LTy);
return ComplexPairTy(zeroConstant, zeroConstant);
}