]> granicus.if.org Git - clang/commitdiff
as eli points out, we're not doing memory stuff here. While ConvertType
authorChris Lattner <sabre@nondot.org>
Wed, 20 Jul 2011 04:59:57 +0000 (04:59 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 20 Jul 2011 04:59:57 +0000 (04:59 +0000)
and ConvertTypeForMem are the same for pointers, it is best to just
use ConvertType.  Thanks Eli!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135567 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprScalar.cpp

index a4992a4ea0a51409f24d7630fb581ca732be0838..6269c5362416945bd6f6ee6ec06e3cc667b8f894 100644 (file)
@@ -174,7 +174,7 @@ namespace {
 }
 
 static llvm::Value *
-CreateReferenceTemporary(CodeGenFunctionCGF, QualType Type,
+CreateReferenceTemporary(CodeGenFunction &CGF, QualType Type,
                          const NamedDecl *InitializedDecl) {
   if (const VarDecl *VD = dyn_cast_or_null<VarDecl>(InitializedDecl)) {
     if (VD->hasGlobalStorage()) {
index f64e98ef684364f68fdc16b23bc7adeb3d21f7bb..3eebbaa9a841922dfbdfbf2a68482db669bedb1b 100644 (file)
@@ -1077,8 +1077,7 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
 
     // Make sure the array decay ends up being the right type.  This matters if
     // the array type was of an incomplete type.
-    return CGF.Builder.CreateBitCast(V, 
-                              CGF.getTypes().ConvertTypeForMem(CE->getType()));
+    return CGF.Builder.CreateBitCast(V, ConvertType(CE->getType()));
   }
   case CK_FunctionToPointerDecay:
     return EmitLValue(E).getAddress();