[llvm] 726b2dd - [IPO] Use default member initialization (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 18 15:41:25 PDT 2022


Author: Kazu Hirata
Date: 2022-06-18T15:41:20-07:00
New Revision: 726b2dd040011196c1b3b0096258055b5baf218b

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

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

Identified with modernize-use-default-member-init.

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp b/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
index c4f5a4e9d7a3..a360a768a2bc 100644
--- a/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+++ b/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
@@ -542,11 +542,11 @@ class WriteThinLTOBitcode : public ModulePass {
   raw_ostream &OS; // raw_ostream to print on
   // The output stream on which to emit a minimized module for use
   // just in the thin link, if requested.
-  raw_ostream *ThinLinkOS;
+  raw_ostream *ThinLinkOS = nullptr;
 
 public:
   static char ID; // Pass identification, replacement for typeid
-  WriteThinLTOBitcode() : ModulePass(ID), OS(dbgs()), ThinLinkOS(nullptr) {
+  WriteThinLTOBitcode() : ModulePass(ID), OS(dbgs()) {
     initializeWriteThinLTOBitcodePass(*PassRegistry::getPassRegistry());
   }
 


        


More information about the llvm-commits mailing list