diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-20 04:59:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-20 04:59:57 +0000 |
commit | 245169620a6b1168adda35cfffdbd4efce7699e3 (patch) | |
tree | 0c05dedab47edddfeeceb99b9369f5110782e294 | |
parent | 221044852041f753c508e30e21fe7ae1d87a6d0f (diff) | |
download | bcm5719-llvm-245169620a6b1168adda35cfffdbd4efce7699e3.tar.gz bcm5719-llvm-245169620a6b1168adda35cfffdbd4efce7699e3.zip |
as eli points out, we're not doing memory stuff here. While ConvertType
and ConvertTypeForMem are the same for pointers, it is best to just
use ConvertType. Thanks Eli!
llvm-svn: 135567
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index a4992a4ea0a..6269c536241 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -174,7 +174,7 @@ namespace { } static llvm::Value * -CreateReferenceTemporary(CodeGenFunction& CGF, QualType Type, +CreateReferenceTemporary(CodeGenFunction &CGF, QualType Type, const NamedDecl *InitializedDecl) { if (const VarDecl *VD = dyn_cast_or_null<VarDecl>(InitializedDecl)) { if (VD->hasGlobalStorage()) { diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index f64e98ef684..3eebbaa9a84 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -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(); |