[Sanitizer] move placement_new definiton from TSan to common runtime
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158145 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/tsan/rtl/tsan_interceptors.cc b/lib/tsan/rtl/tsan_interceptors.cc
index 53d1e14..723d369 100644
--- a/lib/tsan/rtl/tsan_interceptors.cc
+++ b/lib/tsan/rtl/tsan_interceptors.cc
@@ -13,12 +13,12 @@
#include "interception/interception.h"
#include "sanitizer_common/sanitizer_libc.h"
+#include "sanitizer_common/sanitizer_placement_new.h"
#include "tsan_rtl.h"
#include "tsan_interface.h"
#include "tsan_atomic.h"
#include "tsan_platform.h"
#include "tsan_mman.h"
-#include "tsan_placement_new.h"
using namespace __tsan; // NOLINT
diff --git a/lib/tsan/rtl/tsan_interface_ann.cc b/lib/tsan/rtl/tsan_interface_ann.cc
index 07a9ed1..b2e199f 100644
--- a/lib/tsan/rtl/tsan_interface_ann.cc
+++ b/lib/tsan/rtl/tsan_interface_ann.cc
@@ -11,9 +11,9 @@
//
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_libc.h"
+#include "sanitizer_common/sanitizer_placement_new.h"
#include "tsan_interface_ann.h"
#include "tsan_mutex.h"
-#include "tsan_placement_new.h"
#include "tsan_report.h"
#include "tsan_rtl.h"
#include "tsan_mman.h"
diff --git a/lib/tsan/rtl/tsan_interface_atomic.cc b/lib/tsan/rtl/tsan_interface_atomic.cc
index 4f3caf7..a3982a1 100644
--- a/lib/tsan/rtl/tsan_interface_atomic.cc
+++ b/lib/tsan/rtl/tsan_interface_atomic.cc
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#include "sanitizer_common/sanitizer_placement_new.h"
#include "tsan_interface_atomic.h"
-#include "tsan_placement_new.h"
#include "tsan_flags.h"
#include "tsan_rtl.h"
diff --git a/lib/tsan/rtl/tsan_placement_new.h b/lib/tsan/rtl/tsan_placement_new.h
deleted file mode 100644
index e506b17..0000000
--- a/lib/tsan/rtl/tsan_placement_new.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- tsan_placement_new.h ------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file is a part of ThreadSanitizer (TSan), a race detector.
-//
-// The file provides 'placement new'
-// Do not include it into header files, only into source files.
-//===----------------------------------------------------------------------===//
-#ifndef TSAN_PLACEMENT_NEW_H
-#define TSAN_PLACEMENT_NEW_H
-
-#include "tsan_defs.h"
-
-inline void *operator new(__sanitizer::uptr sz, void *p) {
- return p;
-}
-
-#endif // TSAN_PLACEMENT_NEW_H
diff --git a/lib/tsan/rtl/tsan_rtl.cc b/lib/tsan/rtl/tsan_rtl.cc
index d1a4b3f..13847d3 100644
--- a/lib/tsan/rtl/tsan_rtl.cc
+++ b/lib/tsan/rtl/tsan_rtl.cc
@@ -13,13 +13,13 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_libc.h"
+#include "sanitizer_common/sanitizer_placement_new.h"
#include "tsan_defs.h"
#include "tsan_platform.h"
#include "tsan_rtl.h"
#include "tsan_interface.h"
#include "tsan_atomic.h"
#include "tsan_mman.h"
-#include "tsan_placement_new.h"
#include "tsan_suppressions.h"
volatile int __tsan_resumed = 0;
diff --git a/lib/tsan/rtl/tsan_rtl_report.cc b/lib/tsan/rtl/tsan_rtl_report.cc
index ab2dc1e..c6832da 100644
--- a/lib/tsan/rtl/tsan_rtl_report.cc
+++ b/lib/tsan/rtl/tsan_rtl_report.cc
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_libc.h"
+#include "sanitizer_common/sanitizer_placement_new.h"
#include "tsan_platform.h"
#include "tsan_rtl.h"
#include "tsan_suppressions.h"
@@ -20,7 +21,6 @@
#include "tsan_sync.h"
#include "tsan_mman.h"
#include "tsan_flags.h"
-#include "tsan_placement_new.h"
namespace __sanitizer {
using namespace __tsan;
diff --git a/lib/tsan/rtl/tsan_rtl_thread.cc b/lib/tsan/rtl/tsan_rtl_thread.cc
index 67798f1..147e383 100644
--- a/lib/tsan/rtl/tsan_rtl_thread.cc
+++ b/lib/tsan/rtl/tsan_rtl_thread.cc
@@ -11,9 +11,9 @@
//
//===----------------------------------------------------------------------===//
+#include "sanitizer_common/sanitizer_placement_new.h"
#include "tsan_rtl.h"
#include "tsan_mman.h"
-#include "tsan_placement_new.h"
#include "tsan_platform.h"
#include "tsan_report.h"
#include "tsan_sync.h"
diff --git a/lib/tsan/rtl/tsan_sync.cc b/lib/tsan/rtl/tsan_sync.cc
index 0749752..e917c5b 100644
--- a/lib/tsan/rtl/tsan_sync.cc
+++ b/lib/tsan/rtl/tsan_sync.cc
@@ -10,8 +10,8 @@
// This file is a part of ThreadSanitizer (TSan), a race detector.
//
//===----------------------------------------------------------------------===//
+#include "sanitizer_common/sanitizer_placement_new.h"
#include "tsan_sync.h"
-#include "tsan_placement_new.h"
#include "tsan_rtl.h"
#include "tsan_mman.h"