Skip to content

Commit 86f07e8

Browse files
committed
PowerPC - fix uninitialized variable warnings. NFCI.
1 parent e167017 commit 86f07e8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace {
7979
class PPCAsmPrinter : public AsmPrinter {
8080
protected:
8181
MapVector<const MCSymbol *, MCSymbol *> TOC;
82-
const PPCSubtarget *Subtarget;
82+
const PPCSubtarget *Subtarget = nullptr;
8383
StackMaps SM;
8484

8585
public:

llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ namespace {
138138
///
139139
class PPCDAGToDAGISel : public SelectionDAGISel {
140140
const PPCTargetMachine &TM;
141-
const PPCSubtarget *PPCSubTarget;
142-
const PPCTargetLowering *PPCLowering;
143-
unsigned GlobalBaseReg;
141+
const PPCSubtarget *PPCSubTarget = nullptr;
142+
const PPCTargetLowering *PPCLowering = nullptr;
143+
unsigned GlobalBaseReg = 0;
144144

145145
public:
146146
explicit PPCDAGToDAGISel(PPCTargetMachine &tm, CodeGenOpt::Level OptLevel)
@@ -2385,15 +2385,15 @@ class BitPermutationSelector {
23852385

23862386
SmallVector<ValueBit, 64> Bits;
23872387

2388-
bool NeedMask;
2388+
bool NeedMask = false;
23892389
SmallVector<unsigned, 64> RLAmt;
23902390

23912391
SmallVector<BitGroup, 16> BitGroups;
23922392

23932393
DenseMap<std::pair<SDValue, unsigned>, ValueRotInfo> ValueRots;
23942394
SmallVector<ValueRotInfo, 16> ValueRotsVec;
23952395

2396-
SelectionDAG *CurDAG;
2396+
SelectionDAG *CurDAG = nullptr;
23972397

23982398
public:
23992399
BitPermutationSelector(SelectionDAG *DAG)

llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class PPCFunctionInfo : public MachineFunctionInfo {
4242
/// MustSaveLR - Indicates whether LR is defined (or clobbered) in the current
4343
/// function. This is only valid after the initial scan of the function by
4444
/// PEI.
45-
bool MustSaveLR;
45+
bool MustSaveLR = false;
4646

4747
/// MustSaveTOC - Indicates that the TOC save needs to be performed in the
4848
/// prologue of the function. This is typically the case when there are

0 commit comments

Comments
 (0)