[llvm-commits] [compiler-rt] r147300 -	/compiler-rt/trunk/lib/asan/asan_rtl.cc
    Kostya Serebryany 
    kcc at google.com
       
    Tue Dec 27 15:11:09 PST 2011
    
    
  
Author: kcc
Date: Tue Dec 27 17:11:09 2011
New Revision: 147300
URL: http://llvm.org/viewvc/llvm-project?rev=147300&view=rev
Log:
new() has slightly different signature on Android. This patch adds the
Modified:
    compiler-rt/trunk/lib/asan/asan_rtl.cc
Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=147300&r1=147299&r2=147300&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Tue Dec 27 17:11:09 2011
@@ -404,12 +404,17 @@
   GET_STACK_TRACE_HERE_FOR_MALLOC;\
   return asan_memalign(0, size, &stack);
 
+#ifdef ANDROID
+void *operator new(size_t size) { OPERATOR_NEW_BODY; }
+void *operator new[](size_t size) { OPERATOR_NEW_BODY; }
+#else
 void *operator new(size_t size) throw(std::bad_alloc) { OPERATOR_NEW_BODY; }
 void *operator new[](size_t size) throw(std::bad_alloc) { OPERATOR_NEW_BODY; }
 void *operator new(size_t size, std::nothrow_t const&) throw()
 { OPERATOR_NEW_BODY; }
 void *operator new[](size_t size, std::nothrow_t const&) throw()
 { OPERATOR_NEW_BODY; }
+#endif
 
 #define OPERATOR_DELETE_BODY \
   GET_STACK_TRACE_HERE_FOR_FREE(ptr);\
    
    
More information about the llvm-commits
mailing list