[NFC][sanitizer] Add const into method
authorVitaly Buka <vitalybuka@google.com>
Fri, 1 Oct 2021 00:15:07 +0000 (17:15 -0700)
committerVitaly Buka <vitalybuka@google.com>
Fri, 1 Oct 2021 00:16:34 +0000 (17:16 -0700)
compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.h

index e47127e..9215867 100644 (file)
@@ -139,7 +139,7 @@ StackDepotReverseMap::StackDepotReverseMap() {
   Sort(map_.data(), map_.size(), &IdDescPair::IdComparator);
 }
 
-StackTrace StackDepotReverseMap::Get(u32 id) {
+StackTrace StackDepotReverseMap::Get(u32 id) const {
   if (!map_.size())
     return StackTrace();
   IdDescPair pair = {id, nullptr};
index 937c1a4..d4c2ee3 100644 (file)
@@ -50,7 +50,7 @@ void StackDepotPrintAll();
 class StackDepotReverseMap {
  public:
   StackDepotReverseMap();
-  StackTrace Get(u32 id);
+  StackTrace Get(u32 id) const;
 
  private:
   struct IdDescPair {