This revision was automatically updated to reflect the committed changes.
Closed by commit rL291743: [libc++] Pair _aligned_malloc with _aligned_free 
(authored by smeenai).

Changed prior to commit:
  https://reviews.llvm.org/D28512?vs=83783&id=84075#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28512

Files:
  libcxx/trunk/src/new.cpp


Index: libcxx/trunk/src/new.cpp
===================================================================
--- libcxx/trunk/src/new.cpp
+++ libcxx/trunk/src/new.cpp
@@ -198,7 +198,11 @@
 operator delete(void* ptr, std::align_val_t) _NOEXCEPT
 {
     if (ptr)
+#if defined(_LIBCPP_MSVCRT)
+        ::_aligned_free(ptr);
+#else
         ::free(ptr);
+#endif
 }
 
 _LIBCPP_WEAK


Index: libcxx/trunk/src/new.cpp
===================================================================
--- libcxx/trunk/src/new.cpp
+++ libcxx/trunk/src/new.cpp
@@ -198,7 +198,11 @@
 operator delete(void* ptr, std::align_val_t) _NOEXCEPT
 {
     if (ptr)
+#if defined(_LIBCPP_MSVCRT)
+        ::_aligned_free(ptr);
+#else
         ::free(ptr);
+#endif
 }
 
 _LIBCPP_WEAK
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to