From b5106f5c33b79827ce2d329e0ac9f2780b9fe222 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 18 Nov 2009 05:43:15 +0000 Subject: [PATCH] Fix passing of float arguments through ffi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89198 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 8b4e9613ad7..c02d84f1a59 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -158,7 +158,7 @@ static void *ffiValueFor(const Type *Ty, const GenericValue &AV, } case Type::FloatTyID: { float *FloatPtr = (float *) ArgDataPtr; - *FloatPtr = AV.DoubleVal; + *FloatPtr = AV.FloatVal; return ArgDataPtr; } case Type::DoubleTyID: { -- 2.34.1