[llvm-commits] [llvm-gcc-4.2] r73199 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Chris Lattner sabre at nondot.org
Thu Jun 11 11:21:06 PDT 2009


Author: lattner
Date: Thu Jun 11 13:21:05 2009
New Revision: 73199

URL: http://llvm.org/viewvc/llvm-project?rev=73199&view=rev
Log:
Fix a promotion problem on targets where C double is f32.  Patch by
Mikael Lepistö!

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=73199&r1=73198&r2=73199&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Thu Jun 11 13:21:05 2009
@@ -984,8 +984,8 @@
     void HandleScalarArgument(const llvm::Type *LLVMTy, tree type,
                               unsigned RealSize = 0) {
       if (KNRPromotion) {
-        if (LLVMTy == Type::FloatTy)
-          LLVMTy = Type::DoubleTy;
+        if (type == float_type_node)
+          LLVMTy = ConvertType(double_type_node);
         else if (LLVMTy == Type::Int16Ty || LLVMTy == Type::Int8Ty ||
                  LLVMTy == Type::Int1Ty)
           LLVMTy = Type::Int32Ty;





More information about the llvm-commits mailing list