[llvm-commits] [compiler-rt] r158524 - /compiler-rt/trunk/lib/sanitizer_common/sanitizer_placement_new.h
Alexey Samsonov
samsonov at google.com
Fri Jun 15 07:32:39 PDT 2012
Author: samsonov
Date: Fri Jun 15 09:32:39 2012
New Revision: 158524
URL: http://llvm.org/viewvc/llvm-project?rev=158524&view=rev
Log:
[Sanitizer] Fix type for placement new on 32-bit Mac
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_placement_new.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_placement_new.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_placement_new.h?rev=158524&r1=158523&r2=158524&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_placement_new.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_placement_new.h Fri Jun 15 09:32:39 2012
@@ -18,14 +18,16 @@
#include "sanitizer_internal_defs.h"
-#if __WORDSIZE == 64
-inline void *operator new(__sanitizer::uptr sz, void *p) {
- return p;
-}
+namespace __sanitizer {
+#if (__WORDSIZE == 64) || defined(__APPLE__)
+typedef __sanitizer::uptr operator_new_ptr_type;
#else
-inline void *operator new(__sanitizer::u32 sz, void *p) {
+typedef __sanitizer::u32 operator_new_ptr_type;
+#endif
+} // namespace __sanitizer
+
+inline void *operator new(operator_new_ptr_type sz, void *p) {
return p;
}
-#endif
#endif // SANITIZER_PLACEMENT_NEW_H
More information about the llvm-commits
mailing list