diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-02-27 15:44:03 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-02-27 15:44:03 +0000 |
commit | 4efb43207cb1f36870a79350d870ae47717af755 (patch) | |
tree | d2e68d95696a8afc694fb81ddaaa0e31cf5cbd4c /lib/hwasan/hwasan_thread_list.cpp | |
parent | d6f6e5233d6973564eefcba7cd4251fa67e6a234 (diff) | |
download | compiler-rt-4efb43207cb1f36870a79350d870ae47717af755.tar.gz |
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/hwasan/hwasan_thread_list.cpp')
-rw-r--r-- | lib/hwasan/hwasan_thread_list.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/hwasan/hwasan_thread_list.cpp b/lib/hwasan/hwasan_thread_list.cpp new file mode 100644 index 000000000..a31eee84e --- /dev/null +++ b/lib/hwasan/hwasan_thread_list.cpp @@ -0,0 +1,15 @@ +#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 |