diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:24:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:24:23 +0000 |
commit | 2192fe50dac0e0333f013a025619faf5a574c7d4 (patch) | |
tree | ae1044f0d276b7f9b27464c69bea49cacb1729cc /clang/lib/CodeGen/CGExprComplex.cpp | |
parent | 2cf16c90f9f650b173560ec63ac9b6bec3574707 (diff) | |
download | bcm5719-llvm-2192fe50dac0e0333f013a025619faf5a574c7d4.tar.gz bcm5719-llvm-2192fe50dac0e0333f013a025619faf5a574c7d4.zip |
de-constify llvm::Type, patch by David Blaikie!
llvm-svn: 135370
Diffstat (limited to 'clang/lib/CodeGen/CGExprComplex.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 35cff1d7271..672721ef7f3 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/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<ComplexType>()->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<ComplexType>()->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<ComplexType>()->getElementType()); llvm::Value *U = llvm::UndefValue::get(EltTy); return ComplexPairTy(U, U); |