[compiler-rt] 8210948 - [NFC][sanitizer] constexpr StackStore::StackStore()
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 18 19:28:05 PST 2021
Author: Vitaly Buka
Date: 2021-11-18T19:24:29-08:00
New Revision: 8210948a46378459643c81d0284955d0e0748a4c
URL: https://github.com/llvm/llvm-project/commit/8210948a46378459643c81d0284955d0e0748a4c
DIFF: https://github.com/llvm/llvm-project/commit/8210948a46378459643c81d0284955d0e0748a4c.diff
LOG: [NFC][sanitizer] constexpr StackStore::StackStore()
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h b/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
index 604e9fbf34d6..b26bca9c2c79 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
@@ -22,6 +22,8 @@ namespace __sanitizer {
class StackStore {
public:
+ constexpr StackStore() = default;
+
using Id = uptr;
Id store(const StackTrace &trace);
@@ -34,19 +36,19 @@ class StackStore {
uptr *alloc(uptr count = 1);
uptr *tryAlloc(uptr count);
uptr *refillAndAlloc(uptr count);
- mutable StaticSpinMutex mtx; // Protects alloc of new blocks.
- atomic_uintptr_t region_pos; // Region allocator for Node's.
- atomic_uintptr_t region_end;
- atomic_uintptr_t mapped_size;
+ mutable StaticSpinMutex mtx = {}; // Protects alloc of new blocks.
+ atomic_uintptr_t region_pos = {}; // Region allocator for Node's.
+ atomic_uintptr_t region_end = {};
+ atomic_uintptr_t mapped_size = {};
struct BlockInfo {
const BlockInfo *next;
uptr ptr;
uptr size;
};
- const BlockInfo *curr;
+ const BlockInfo *curr = nullptr;
};
} // namespace __sanitizer
-#endif // SANITIZER_STACK_STORE_H
\ No newline at end of file
+#endif // SANITIZER_STACK_STORE_H
More information about the llvm-commits
mailing list