[compiler-rt] r224577 - [sanitizer] Rename InitIfLinkerInitialized to InitLinkerInitialized.
Sergey Matveev
earthdok at google.com
Fri Dec 19 06:45:19 PST 2014
Author: smatveev
Date: Fri Dec 19 08:45:19 2014
New Revision: 224577
URL: http://llvm.org/viewvc/llvm-project?rev=224577&view=rev
Log:
[sanitizer] Rename InitIfLinkerInitialized to InitLinkerInitialized.
Modified:
compiler-rt/trunk/lib/lsan/lsan_allocator.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h
Modified: compiler-rt/trunk/lib/lsan/lsan_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_allocator.cc?rev=224577&r1=224576&r2=224577&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_allocator.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_allocator.cc Fri Dec 19 08:45:19 2014
@@ -47,7 +47,7 @@ static Allocator allocator;
static THREADLOCAL AllocatorCache cache;
void InitializeAllocator() {
- allocator.InitIfLinkerInitialized(common_flags()->allocator_may_return_null);
+ allocator.InitLinkerInitialized(common_flags()->allocator_may_return_null);
}
void AllocatorThreadFinish() {
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h?rev=224577&r1=224576&r2=224577&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h Fri Dec 19 08:45:19 2014
@@ -211,7 +211,7 @@ class AllocatorStats {
void Init() {
internal_memset(this, 0, sizeof(*this));
}
- void InitIfLinkerInitialized() {}
+ void InitLinkerInitialized() {}
void Add(AllocatorStat i, uptr v) {
v += atomic_load(&stats_[i], memory_order_relaxed);
@@ -241,13 +241,13 @@ class AllocatorStats {
// Global stats, used for aggregation and querying.
class AllocatorGlobalStats : public AllocatorStats {
public:
- void InitIfLinkerInitialized() {
+ void InitLinkerInitialized() {
next_ = this;
prev_ = this;
}
void Init() {
internal_memset(this, 0, sizeof(*this));
- InitIfLinkerInitialized();
+ InitLinkerInitialized();
}
void Register(AllocatorStats *s) {
@@ -1006,14 +1006,14 @@ struct SizeClassAllocatorLocalCache {
template <class MapUnmapCallback = NoOpMapUnmapCallback>
class LargeMmapAllocator {
public:
- void InitIfLinkerInitialized(bool may_return_null) {
+ void InitLinkerInitialized(bool may_return_null) {
page_size_ = GetPageSizeCached();
atomic_store(&may_return_null_, may_return_null, memory_order_relaxed);
}
void Init(bool may_return_null) {
internal_memset(this, 0, sizeof(*this));
- InitIfLinkerInitialized(may_return_null);
+ InitLinkerInitialized(may_return_null);
}
void *Allocate(AllocatorStats *stat, uptr size, uptr alignment) {
@@ -1266,9 +1266,9 @@ class CombinedAllocator {
atomic_store(&may_return_null_, may_return_null, memory_order_relaxed);
}
- void InitIfLinkerInitialized(bool may_return_null) {
- secondary_.InitIfLinkerInitialized(may_return_null);
- stats_.InitIfLinkerInitialized();
+ void InitLinkerInitialized(bool may_return_null) {
+ secondary_.InitLinkerInitialized(may_return_null);
+ stats_.InitLinkerInitialized();
InitCommon(may_return_null);
}
More information about the llvm-commits
mailing list