[llvm] d534967 - [Orc] Use default member initialization (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 23 18:36:40 PDT 2022


Author: Kazu Hirata
Date: 2022-07-23T18:36:23-07:00
New Revision: d534967b6667c468b12e9ed5e3c482f590dde633

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

LOG: [Orc] Use default member initialization (NFC)

Identified with modernize-use-default-member-init

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp b/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp
index 75cc30753f416..145d4c61de8c2 100644
--- a/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp
@@ -28,12 +28,12 @@ class EPCGenericJITLinkMemoryManager::InFlightAlloc
   // We should be able to switch this back to member initialization once that
   // issue is fixed.
   struct SegInfo {
-    SegInfo() : WorkingMem(nullptr), ContentSize(0), ZeroFillSize(0) {}
+    SegInfo() = default;
 
-    char *WorkingMem;
+    char *WorkingMem = nullptr;
     ExecutorAddr Addr;
-    uint64_t ContentSize;
-    uint64_t ZeroFillSize;
+    uint64_t ContentSize = 0;
+    uint64_t ZeroFillSize = 0;
   };
 
   using SegInfoMap = AllocGroupSmallMap<SegInfo>;


        


More information about the llvm-commits mailing list