[llvm] 70fc36d - [MC] Use default member initialization in WasmCustomSection (NFC)
    Kazu Hirata via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sat Feb  5 16:54:51 PST 2022
    
    
  
Author: Kazu Hirata
Date: 2022-02-05T16:29:19-08:00
New Revision: 70fc36d8ed52207cca7695df3623acce2f8b911b
URL: https://github.com/llvm/llvm-project/commit/70fc36d8ed52207cca7695df3623acce2f8b911b
DIFF: https://github.com/llvm/llvm-project/commit/70fc36d8ed52207cca7695df3623acce2f8b911b.diff
LOG: [MC] Use default member initialization in WasmCustomSection (NFC)
Added: 
    
Modified: 
    llvm/lib/MC/WasmObjectWriter.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 636c1d238932f..c7e08ef69648f 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -125,12 +125,11 @@ struct WasmCustomSection {
   StringRef Name;
   MCSectionWasm *Section;
 
-  uint32_t OutputContentsOffset;
-  uint32_t OutputIndex;
+  uint32_t OutputContentsOffset = 0;
+  uint32_t OutputIndex = InvalidIndex;
 
   WasmCustomSection(StringRef Name, MCSectionWasm *Section)
-      : Name(Name), Section(Section), OutputContentsOffset(0),
-        OutputIndex(InvalidIndex) {}
+      : Name(Name), Section(Section) {}
 };
 
 #if !defined(NDEBUG)
        
    
    
More information about the llvm-commits
mailing list