Files
llvm/compiler-rt/lib/hwasan/hwasan_thread_list.cpp
Nico Weber e3b6d11038 hwasan: Rename source files from cc to cpp
As discussed elsewhere: LLVM uses cpp as its C++ source extension; the
sanitizers should too. This updates files in hwasan.

Patch generated by

    for f in lib/hwasan/*.cc ; do svn mv $f ${f%.cc}.cpp; done

followed by

    for f in lib/hwasan/*.cpp ; do sed -i '' -e '1s/\.cc -/.cpp /' $f; done

CMakeLists.txt updated manually.

Differential Revision: https://reviews.llvm.org/D58620

llvm-svn: 354989
2019-02-27 15:44:03 +00:00

16 lines
442 B
C++

#include "hwasan_thread_list.h"
namespace __hwasan {
static ALIGNED(16) char thread_list_placeholder[sizeof(HwasanThreadList)];
static HwasanThreadList *hwasan_thread_list;
HwasanThreadList &hwasanThreadList() { return *hwasan_thread_list; }
void InitThreadList(uptr storage, uptr size) {
CHECK(hwasan_thread_list == nullptr);
hwasan_thread_list =
new (thread_list_placeholder) HwasanThreadList(storage, size);
}
} // namespace