[compiler-rt] 95aa116 - [scudo][NFC] Fix clang-tidy warnings

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sat May 1 01:57:41 PDT 2021


Author: Vitaly Buka
Date: 2021-05-01T01:55:21-07:00
New Revision: 95aa116d0cf3fcc67bfab050fda132b14960c4df

URL: https://github.com/llvm/llvm-project/commit/95aa116d0cf3fcc67bfab050fda132b14960c4df
DIFF: https://github.com/llvm/llvm-project/commit/95aa116d0cf3fcc67bfab050fda132b14960c4df.diff

LOG: [scudo][NFC] Fix clang-tidy warnings

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/secondary.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index 540f6b63c36f9..ea5d6808aec9e 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -9,9 +9,12 @@
 #ifndef SCUDO_SECONDARY_H_
 #define SCUDO_SECONDARY_H_
 
+#include "chunk.h"
 #include "common.h"
 #include "list.h"
+#include "memtag.h"
 #include "mutex.h"
+#include "options.h"
 #include "stats.h"
 #include "string_utils.h"
 
@@ -279,13 +282,15 @@ template <typename Config> class MapAllocatorCache {
               Config::SecondaryCacheMinReleaseToOsIntervalMs);
       atomic_store_relaxed(&ReleaseToOsIntervalMs, Interval);
       return true;
-    } else if (O == Option::MaxCacheEntriesCount) {
+    }
+    if (O == Option::MaxCacheEntriesCount) {
       const u32 MaxCount = static_cast<u32>(Value);
       if (MaxCount > Config::SecondaryCacheEntriesArraySize)
         return false;
       atomic_store_relaxed(&MaxEntriesCount, MaxCount);
       return true;
-    } else if (O == Option::MaxCacheEntrySize) {
+    }
+    if (O == Option::MaxCacheEntrySize) {
       atomic_store_relaxed(&MaxEntrySize, static_cast<uptr>(Value));
       return true;
     }


        


More information about the llvm-commits mailing list