diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2021-07-29 18:14:22 +0200 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2021-07-30 11:51:55 +0200 |
commit | 817f942a287725e758798f5b639e7ca1ccf0e83f (patch) | |
tree | bb48b8b7d20050e6c7652d78d188b34910ae0f25 /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | |
parent | 1e9799e204ff9eaa2160304e6a139c2faa850d33 (diff) | |
download | llvm-817f942a287725e758798f5b639e7ca1ccf0e83f.zip llvm-817f942a287725e758798f5b639e7ca1ccf0e83f.tar.gz llvm-817f942a287725e758798f5b639e7ca1ccf0e83f.tar.bz2 |
tsan: introduce New/Alloc/Free helpers
We frequenty allocate sizeof(T) memory and call T ctor on that memory
(C++ new keyword effectively). Currently it's quite verbose and
usually takes 2 lines of code.
Add New<T>() helper that does it much more concisely.
Rename internal_free to Free that also sets the pointer to nullptr.
Shorter and safer.
Rename internal_alloc to Alloc, just shorter.
Reviewed By: vitalybuka, melver
Differential Revision: https://reviews.llvm.org/D107085
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
0 files changed, 0 insertions, 0 deletions