diff gen/tocall.cpp @ 797:340acf1535d0

Removed KDevelop3 project files, CMake can generate them just fine! Fixed function literals in static initializers. Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE. Changed errors to go to stderr instead of stdout. Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sat, 29 Nov 2008 21:25:43 +0100
parents 5d2ac0c2dd46
children 1b23aa1fb1b5
line wrap: on
line diff
--- a/gen/tocall.cpp	Sat Nov 29 12:28:10 2008 +0100
+++ b/gen/tocall.cpp	Sat Nov 29 21:25:43 2008 +0100
@@ -41,11 +41,12 @@
     {
         //TODO: StdCall is not a good base on Windows due to extra name mangling
         // applied there
-        if (global.params.cpu == ARCHx86 && global.params.os != OSWindows)
-            return llvm::CallingConv::X86_StdCall;
+        if (global.params.cpu == ARCHx86)
+            return (global.params.os != OSWindows) ? llvm::CallingConv::X86_StdCall : llvm::CallingConv::C;
         else
             return llvm::CallingConv::Fast;
     }
+    // on the other hand, here, it's exactly what we want!!! TODO: right?
     else if (l == LINKwindows)
         return llvm::CallingConv::X86_StdCall;
     else
@@ -155,7 +156,6 @@
     }
 
     // build type info array
-    assert(Type::typeinfo->ir.irStruct->constInit);
     const LLType* typeinfotype = DtoType(Type::typeinfo->type);
     const LLArrayType* typeinfoarraytype = LLArrayType::get(typeinfotype,vtype->getNumElements());