[llvm] 89c4acd - [Coverity] Initialize pointer memeber.

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 02:51:31 PDT 2023


Author: Luo, Yuanke
Date: 2023-03-31T17:50:58+08:00
New Revision: 89c4acd0c1f85f7a9ada84ea068d7b708d41bfeb

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

LOG: [Coverity] Initialize pointer memeber.

Added: 
    

Modified: 
    llvm/lib/CodeGen/ExpandMemCmp.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/ExpandMemCmp.cpp b/llvm/lib/CodeGen/ExpandMemCmp.cpp
index 3838eaadd1d25..6b721a160970e 100644
--- a/llvm/lib/CodeGen/ExpandMemCmp.cpp
+++ b/llvm/lib/CodeGen/ExpandMemCmp.cpp
@@ -78,8 +78,8 @@ class MemCmpExpansion {
   uint64_t NumLoadsNonOneByte = 0;
   const uint64_t NumLoadsPerBlockForZeroCmp;
   std::vector<BasicBlock *> LoadCmpBlocks;
-  BasicBlock *EndBlock;
-  PHINode *PhiRes;
+  BasicBlock *EndBlock = nullptr;
+  PHINode *PhiRes = nullptr;
   const bool IsUsedForZeroCmp;
   const DataLayout &DL;
   DomTreeUpdater *DTU;


        


More information about the llvm-commits mailing list