sanitizer_placement_new.h 885 B

123456789101112131415161718192021222324
  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. #include "sanitizer_internal_defs.h"
  18. inline void *operator new(__sanitizer::operator_new_size_type sz, void *p) {
  19. return p;
  20. }
  21. #endif // SANITIZER_PLACEMENT_NEW_H