diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-24 06:23:39 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-24 06:23:39 +0000 |
| commit | 50cb32e6149b8e6f25699a9040cf1e9ab3302d7e (patch) | |
| tree | 111ba8f2c0afbd42823011d742e55f8b17d36166 /compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc | |
| parent | d04d096ecfc2e4c82ce77f406b6cdd868941b6eb (diff) | |
| download | bcm5719-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.cc | 3 |
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; |

