[llvm] 9db75b2 - [Coverity] Initialize pointer memeber.

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 02:30:10 PDT 2023


Author: Luo, Yuanke
Date: 2023-04-06T17:29:53+08:00
New Revision: 9db75b23bd703779af7d30b9a1443b052808b691

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

LOG: [Coverity] Initialize pointer memeber.

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp b/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp
index c400ce190b46..f69febadcd77 100644
--- a/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp
+++ b/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp
@@ -39,8 +39,8 @@ STATISTIC(NumRemoved, "Number of redundant instructions removed.");
 namespace {
 
 class MachineLateInstrsCleanup : public MachineFunctionPass {
-  const TargetRegisterInfo *TRI;
-  const TargetInstrInfo *TII;
+  const TargetRegisterInfo *TRI = nullptr;
+  const TargetInstrInfo *TII = nullptr;
 
   // Data structures to map regs to their definitions per MBB.
   using Reg2DefMap = std::map<Register, MachineInstr*>;


        


More information about the llvm-commits mailing list