2012-06-07 17:50:16 +08:00
|
|
|
//===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===//
|
2012-05-10 21:48:04 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2012-05-10 21:48:04 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2012-06-07 17:50:16 +08:00
|
|
|
// This file is shared between AddressSanitizer and ThreadSanitizer
|
|
|
|
// run-time libraries.
|
2012-05-10 21:48:04 +08:00
|
|
|
//
|
2012-06-07 17:50:16 +08:00
|
|
|
// The file provides 'placement new'.
|
2012-05-10 21:48:04 +08:00
|
|
|
// Do not include it into header files, only into source files.
|
|
|
|
//===----------------------------------------------------------------------===//
|
2012-06-07 17:50:16 +08:00
|
|
|
#ifndef SANITIZER_PLACEMENT_NEW_H
|
|
|
|
#define SANITIZER_PLACEMENT_NEW_H
|
2012-05-10 21:48:04 +08:00
|
|
|
|
2012-06-07 17:50:16 +08:00
|
|
|
#include "sanitizer_internal_defs.h"
|
2012-05-10 21:48:04 +08:00
|
|
|
|
2013-10-24 14:23:39 +08:00
|
|
|
inline void *operator new(__sanitizer::operator_new_size_type sz, void *p) {
|
2012-06-07 18:09:41 +08:00
|
|
|
return p;
|
|
|
|
}
|
2012-05-10 21:48:04 +08:00
|
|
|
|
2012-06-07 17:50:16 +08:00
|
|
|
#endif // SANITIZER_PLACEMENT_NEW_H
|