diff --git a/llvm/lib/Target/X86/X86FixupBWInsts.cpp b/llvm/lib/Target/X86/X86FixupBWInsts.cpp --- a/llvm/lib/Target/X86/X86FixupBWInsts.cpp +++ b/llvm/lib/Target/X86/X86FixupBWInsts.cpp @@ -148,8 +148,8 @@ /// Register Liveness information after the current instruction. LivePhysRegs LiveRegs; - ProfileSummaryInfo *PSI; - MachineBlockFrequencyInfo *MBFI; + ProfileSummaryInfo *PSI = nullptr; + MachineBlockFrequencyInfo *MBFI = nullptr; }; char FixupBWInstPass::ID = 0; } diff --git a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp --- a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp +++ b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp @@ -154,9 +154,9 @@ using EdgeSet = MachineGadgetGraph::EdgeSet; using NodeSet = MachineGadgetGraph::NodeSet; - const X86Subtarget *STI; - const TargetInstrInfo *TII; - const TargetRegisterInfo *TRI; + const X86Subtarget *STI = nullptr; + const TargetInstrInfo *TII = nullptr; + const TargetRegisterInfo *TRI = nullptr; std::unique_ptr getGadgetGraph(MachineFunction &MF, const MachineLoopInfo &MLI,