147b1634df012507799eb39aa17d4022d748ba67bAlexey Samsonov//===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===//
27ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany//
37ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany//                     The LLVM Compiler Infrastructure
47ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany//
57ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany// This file is distributed under the University of Illinois Open Source
67ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany// License. See LICENSE.TXT for details.
77ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany//
87ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany//===----------------------------------------------------------------------===//
97ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany//
1047b1634df012507799eb39aa17d4022d748ba67bAlexey Samsonov// This file is shared between AddressSanitizer and ThreadSanitizer
1147b1634df012507799eb39aa17d4022d748ba67bAlexey Samsonov// run-time libraries.
127ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany//
1347b1634df012507799eb39aa17d4022d748ba67bAlexey Samsonov// The file provides 'placement new'.
147ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany// Do not include it into header files, only into source files.
157ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany//===----------------------------------------------------------------------===//
1647b1634df012507799eb39aa17d4022d748ba67bAlexey Samsonov#ifndef SANITIZER_PLACEMENT_NEW_H
1747b1634df012507799eb39aa17d4022d748ba67bAlexey Samsonov#define SANITIZER_PLACEMENT_NEW_H
187ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany
1947b1634df012507799eb39aa17d4022d748ba67bAlexey Samsonov#include "sanitizer_internal_defs.h"
207ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany
2153177247698bfba075f2d5b255a447fc3ced6976Peter Collingbourneinline void *operator new(__sanitizer::operator_new_size_type sz, void *p) {
229fe7b96f92606057dacb9130c08d32430d8be86fAlexey Samsonov  return p;
239fe7b96f92606057dacb9130c08d32430d8be86fAlexey Samsonov}
247ac41484ea322e0ea5774df681660269f5dc321eKostya Serebryany
2547b1634df012507799eb39aa17d4022d748ba67bAlexey Samsonov#endif  // SANITIZER_PLACEMENT_NEW_H
26