[cfe-commits] r135388 - /cfe/trunk/lib/Headers/mm_malloc.h

NAKAMURA Takumi geek4civic at gmail.com
Mon Jul 18 04:13:50 PDT 2011


Author: chapuni
Date: Mon Jul 18 06:13:50 2011
New Revision: 135388

URL: http://llvm.org/viewvc/llvm-project?rev=135388&view=rev
Log:
lib/Headers/mm_malloc.h: Use __mingw_aligned_malloc() in _mm_malloc() on mingw.

By default, mingw does not have _mm_alloc() nor _aligned_malloc().

Modified:
    cfe/trunk/lib/Headers/mm_malloc.h

Modified: cfe/trunk/lib/Headers/mm_malloc.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/mm_malloc.h?rev=135388&r1=135387&r2=135388&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/mm_malloc.h (original)
+++ cfe/trunk/lib/Headers/mm_malloc.h Mon Jul 18 06:13:50 2011
@@ -53,7 +53,9 @@
     align = sizeof(void *);
 
   void *mallocedMemory;
-#ifdef _WIN32
+#if defined(__MINGW32__)
+  mallocedMemory = __mingw_aligned_malloc(size, align);
+#elif defined(_WIN32)
   mallocedMemory = _aligned_malloc(size, align);
 #else
   if (posix_memalign(&mallocedMemory, align, size))





More information about the cfe-commits mailing list