From: Nick Lewycky Date: Wed, 18 Nov 2009 05:43:15 +0000 (+0000) Subject: Fix passing of float arguments through ffi. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b5106f5c33b79827ce2d329e0ac9f2780b9fe222;p=oota-llvm.git Fix passing of float arguments through ffi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89198 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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: {