From 2acc6e3feda5e4f7d9009bdcf8b1cd777fecfe2d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 18 Jul 2011 04:24:23 +0000 Subject: de-constify llvm::Type, patch by David Blaikie! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprComplex.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CGExprComplex.cpp') diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index 35cff1d727..672721ef7f 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -312,7 +312,7 @@ void ComplexExprEmitter::EmitStoreOfComplex(ComplexPairTy Val, llvm::Value *Ptr, ComplexPairTy ComplexExprEmitter::VisitExpr(Expr *E) { CGF.ErrorUnsupported(E, "complex expression"); - const llvm::Type *EltTy = + llvm::Type *EltTy = CGF.ConvertType(E->getType()->getAs()->getElementType()); llvm::Value *U = llvm::UndefValue::get(EltTy); return ComplexPairTy(U, U); @@ -740,7 +740,7 @@ ComplexPairTy ComplexExprEmitter::VisitInitListExpr(InitListExpr *E) { // Empty init list intializes to null QualType Ty = E->getType()->getAs()->getElementType(); - const llvm::Type* LTy = CGF.ConvertType(Ty); + llvm::Type* LTy = CGF.ConvertType(Ty); llvm::Value* zeroConstant = llvm::Constant::getNullValue(LTy); return ComplexPairTy(zeroConstant, zeroConstant); } @@ -751,7 +751,7 @@ ComplexPairTy ComplexExprEmitter::VisitVAArgExpr(VAArgExpr *E) { if (!ArgPtr) { CGF.ErrorUnsupported(E, "complex va_arg expression"); - const llvm::Type *EltTy = + llvm::Type *EltTy = CGF.ConvertType(E->getType()->getAs()->getElementType()); llvm::Value *U = llvm::UndefValue::get(EltTy); return ComplexPairTy(U, U); -- cgit v1.2.3