[NFC][sanitizer] Make method const
authorVitaly Buka <vitalybuka@google.com>
Tue, 23 Nov 2021 21:49:41 +0000 (13:49 -0800)
committerVitaly Buka <vitalybuka@google.com>
Tue, 23 Nov 2021 21:50:07 +0000 (13:50 -0800)
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h

index a028950..e6c61d9 100644 (file)
@@ -43,7 +43,7 @@ StackStore::Id StackStore::Store(const StackTrace &trace) {
   return reinterpret_cast<StackStore::Id>(stack_trace);
 }
 
-StackTrace StackStore::Load(Id id) {
+StackTrace StackStore::Load(Id id) const {
   if (!id)
     return {};
   const uptr *stack_trace = reinterpret_cast<const uptr *>(id);
index 35602d2..4e24fd2 100644 (file)
@@ -23,7 +23,7 @@ class StackStore {
   using Id = uptr;
 
   Id Store(const StackTrace &trace);
-  StackTrace Load(Id id);
+  StackTrace Load(Id id) const;
   uptr Allocated() const;
 
   void TestOnlyUnmap();