1 //===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This file is shared between AddressSanitizer and ThreadSanitizer 10 // run-time libraries. 11 // 12 // The file provides 'placement new'. 13 // Do not include it into header files, only into source files. 14 //===----------------------------------------------------------------------===// 15 #ifndef SANITIZER_PLACEMENT_NEW_H 16 #define SANITIZER_PLACEMENT_NEW_H 17 18 #include "sanitizer_internal_defs.h" 19 new(__sanitizer::usize sz,void * p)20inline void *operator new(__sanitizer::usize sz, void *p) { return p; } 21 22 #endif // SANITIZER_PLACEMENT_NEW_H 23