]> granicus.if.org Git - clang/commitdiff
Use ConvertTypeForMem when creating alloca for scalar argument.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 3 Feb 2009 23:04:57 +0000 (23:04 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 3 Feb 2009 23:04:57 +0000 (23:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63681 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp

index 0535a667bc1e0ca133e89c168941acf13574654c..8967ffbfc9b2b2a835eb609b9f6061d017562d7c 100644 (file)
@@ -1337,7 +1337,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
       // FIXME: Avoid the conversion through memory if possible.
       llvm::Value *SrcPtr;
       if (RV.isScalar()) {
-        SrcPtr = CreateTempAlloca(ConvertType(I->second), "coerce");
+        SrcPtr = CreateTempAlloca(ConvertTypeForMem(I->second), "coerce");
         Builder.CreateStore(RV.getScalarVal(), SrcPtr);
       } else if (RV.isComplex()) {
         SrcPtr = CreateTempAlloca(ConvertType(I->second), "coerce");