summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-10-24 06:23:39 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-10-24 06:23:39 +0000
commit50cb32e6149b8e6f25699a9040cf1e9ab3302d7e (patch)
tree111ba8f2c0afbd42823011d742e55f8b17d36166 /compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
parentd04d096ecfc2e4c82ce77f406b6cdd868941b6eb (diff)
downloadbcm5719-llvm-50cb32e6149b8e6f25699a9040cf1e9ab3302d7e.tar.gz
bcm5719-llvm-50cb32e6149b8e6f25699a9040cf1e9ab3302d7e.zip
Introduce an operator new for LowLevelAllocator, and convert most users to it.
llvm-svn: 193308
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc')
-rw-r--r--compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
index e080403fb56..ddc8dba5d3e 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
@@ -23,8 +23,7 @@ static LowLevelAllocator tctx_allocator;
template<typename TCTX>
static ThreadContextBase *GetThreadContext(u32 tid) {
BlockingMutexLock l(&tctx_allocator_lock);
- void *mem = tctx_allocator.Allocate(sizeof(TCTX));
- return new(mem) TCTX(tid);
+ return new(tctx_allocator) TCTX(tid);
}
static const u32 kMaxRegistryThreads = 1000;
OpenPOWER on IntegriCloud