xref: /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
10b57cec5SDimitry Andric //===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
90b57cec5SDimitry Andric // This file is shared between AddressSanitizer and ThreadSanitizer
100b57cec5SDimitry Andric // run-time libraries.
110b57cec5SDimitry Andric //
120b57cec5SDimitry Andric // The file provides 'placement new'.
130b57cec5SDimitry Andric // Do not include it into header files, only into source files.
140b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
150b57cec5SDimitry Andric #ifndef SANITIZER_PLACEMENT_NEW_H
160b57cec5SDimitry Andric #define SANITIZER_PLACEMENT_NEW_H
170b57cec5SDimitry Andric 
180b57cec5SDimitry Andric #include "sanitizer_internal_defs.h"
190b57cec5SDimitry Andric 
new(__sanitizer::usize sz,void * p)20*0fca6ea1SDimitry Andric inline void *operator new(__sanitizer::usize sz, void *p) { return p; }
210b57cec5SDimitry Andric 
220b57cec5SDimitry Andric #endif  // SANITIZER_PLACEMENT_NEW_H
23