From: Simon Pilgrim Date: Wed, 13 Nov 2019 14:15:17 +0000 (+0000) Subject: Sparc - fix uninitialized variable warnings. NFCI. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3be859baa8eb84d1d2a304032c328a54a0d1901;p=platform%2Fupstream%2Fllvm.git Sparc - fix uninitialized variable warnings. NFCI. --- diff --git a/llvm/lib/Target/Sparc/DelaySlotFiller.cpp b/llvm/lib/Target/Sparc/DelaySlotFiller.cpp index db8e785..7319924 100644 --- a/llvm/lib/Target/Sparc/DelaySlotFiller.cpp +++ b/llvm/lib/Target/Sparc/DelaySlotFiller.cpp @@ -37,7 +37,7 @@ static cl::opt DisableDelaySlotFiller( namespace { struct Filler : public MachineFunctionPass { - const SparcSubtarget *Subtarget; + const SparcSubtarget *Subtarget = nullptr; static char ID; Filler() : MachineFunctionPass(ID) {} diff --git a/llvm/lib/Target/Sparc/LeonPasses.h b/llvm/lib/Target/Sparc/LeonPasses.h index 154a2b4..b165bc9 100644 --- a/llvm/lib/Target/Sparc/LeonPasses.h +++ b/llvm/lib/Target/Sparc/LeonPasses.h @@ -23,7 +23,7 @@ namespace llvm { class LLVM_LIBRARY_VISIBILITY LEONMachineFunctionPass : public MachineFunctionPass { protected: - const SparcSubtarget *Subtarget; + const SparcSubtarget *Subtarget = nullptr; const int LAST_OPERAND = -1; // this vector holds free registers that we allocate in groups for some of the diff --git a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp index 4e61c34..e68f3d8 100644 --- a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -31,7 +31,7 @@ namespace { class SparcDAGToDAGISel : public SelectionDAGISel { /// Subtarget - Keep a pointer to the Sparc Subtarget around so that we can /// make the right decision when generating code for different targets. - const SparcSubtarget *Subtarget; + const SparcSubtarget *Subtarget = nullptr; public: explicit SparcDAGToDAGISel(SparcTargetMachine &tm) : SelectionDAGISel(tm) {}