Skip to content

Commit b3be859

Browse files
committed
Sparc - fix uninitialized variable warnings. NFCI.
1 parent 66f2ed0 commit b3be859

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

llvm/lib/Target/Sparc/DelaySlotFiller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static cl::opt<bool> DisableDelaySlotFiller(
3737

3838
namespace {
3939
struct Filler : public MachineFunctionPass {
40-
const SparcSubtarget *Subtarget;
40+
const SparcSubtarget *Subtarget = nullptr;
4141

4242
static char ID;
4343
Filler() : MachineFunctionPass(ID) {}

llvm/lib/Target/Sparc/LeonPasses.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace llvm {
2323
class LLVM_LIBRARY_VISIBILITY LEONMachineFunctionPass
2424
: public MachineFunctionPass {
2525
protected:
26-
const SparcSubtarget *Subtarget;
26+
const SparcSubtarget *Subtarget = nullptr;
2727
const int LAST_OPERAND = -1;
2828

2929
// this vector holds free registers that we allocate in groups for some of the

llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace {
3131
class SparcDAGToDAGISel : public SelectionDAGISel {
3232
/// Subtarget - Keep a pointer to the Sparc Subtarget around so that we can
3333
/// make the right decision when generating code for different targets.
34-
const SparcSubtarget *Subtarget;
34+
const SparcSubtarget *Subtarget = nullptr;
3535
public:
3636
explicit SparcDAGToDAGISel(SparcTargetMachine &tm) : SelectionDAGISel(tm) {}
3737

0 commit comments

Comments
 (0)