llvm-project/compiler-rt/lib/tsan/go
Dmitry Vyukov 817f942a28 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
2021-07-30 11:51:55 +02:00
..
build.bat tsan: switch from SSE3 to SSE4.2 2021-07-29 07:50:46 +02:00
buildgo.sh tsan: switch from SSE3 to SSE4.2 2021-07-29 07:50:46 +02:00
test.c tsan: Adding releaseAcquire() to ThreadClock 2020-03-24 11:27:46 +01:00
tsan_go.cpp tsan: introduce New/Alloc/Free helpers 2021-07-30 11:51:55 +02:00