diff options
| author | Alexey Samsonov <samsonov@google.com> | 2012-06-07 09:50:16 +0000 |
|---|---|---|
| committer | Alexey Samsonov <samsonov@google.com> | 2012-06-07 09:50:16 +0000 |
| commit | 8bd9098b326ced17d1bc388279d9f23c0dadf8dc (patch) | |
| tree | 2072f78c4a4f0bf3d28b4789802d92e366a8e243 /compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h | |
| parent | 94e2b7d0403b1934a942d57a54944400d0d59bda (diff) | |
| download | bcm5719-llvm-8bd9098b326ced17d1bc388279d9f23c0dadf8dc.tar.gz bcm5719-llvm-8bd9098b326ced17d1bc388279d9f23c0dadf8dc.zip | |
[Sanitizer] move placement_new definiton from TSan to common runtime
llvm-svn: 158145
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h b/compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h new file mode 100644 index 00000000000..9f794ac0431 --- /dev/null +++ b/compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h @@ -0,0 +1,25 @@ +//===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is shared between AddressSanitizer and ThreadSanitizer +// run-time libraries. +// +// The file provides 'placement new'. +// Do not include it into header files, only into source files. +//===----------------------------------------------------------------------===// +#ifndef SANITIZER_PLACEMENT_NEW_H +#define SANITIZER_PLACEMENT_NEW_H + +#include "sanitizer_internal_defs.h" + +inline void *operator new(__sanitizer::uptr sz, void *p) { + return p; +} + +#endif // SANITIZER_PLACEMENT_NEW_H |

