[compiler-rt] 280ffaf - [scudo] Simple coding style fix in mem_map_base.h (NFC)

Chia-hung Duan via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 14:30:21 PDT 2023


Author: Chia-hung Duan
Date: 2023-07-10T21:29:26Z
New Revision: 280ffafca56f4bf8544281b114c144cf6bd7432f

URL: https://github.com/llvm/llvm-project/commit/280ffafca56f4bf8544281b114c144cf6bd7432f
DIFF: https://github.com/llvm/llvm-project/commit/280ffafca56f4bf8544281b114c144cf6bd7432f.diff

LOG: [scudo] Simple coding style fix in mem_map_base.h (NFC)

Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D154894

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/mem_map_base.h b/compiler-rt/lib/scudo/standalone/mem_map_base.h
index 8f06a523fb4d8b..99ab0cba604fc1 100644
--- a/compiler-rt/lib/scudo/standalone/mem_map_base.h
+++ b/compiler-rt/lib/scudo/standalone/mem_map_base.h
@@ -50,8 +50,7 @@ template <class Derived> class MemMapBase {
   void setMemoryPermission(uptr Addr, uptr Size, uptr Flags) {
     DCHECK(isAllocated());
     DCHECK((Addr >= getBase()) && (Addr + Size <= getBase() + getCapacity()));
-    return static_cast<Derived *>(this)->setMemoryPermissionImpl(Addr, Size,
-                                                                 Flags);
+    return invokeImpl(&Derived::setMemoryPermissionImpl, Addr, Size, Flags);
   }
 
   // Suggest releasing a set of contiguous physical pages back to the OS. Note


        


More information about the llvm-commits mailing list