From e0b1d25108a3374d58c602953896a7f540ac3301 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 14 Nov 2019 13:50:38 +0000 Subject: [PATCH] Fix uninitialized variable warnings. NFCI. --- lib/Target/ARM/ARMAsmPrinter.cpp | 4 ++-- lib/Target/ARM/ARMHazardRecognizer.h | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index c8c91e53c44..ed0969fa625 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -54,8 +54,8 @@ using namespace llvm; ARMAsmPrinter::ARMAsmPrinter(TargetMachine &TM, std::unique_ptr Streamer) - : AsmPrinter(TM, std::move(Streamer)), AFI(nullptr), MCP(nullptr), - InConstantPool(false), OptimizationGoals(-1) {} + : AsmPrinter(TM, std::move(Streamer)), Subtarget(nullptr), AFI(nullptr), + MCP(nullptr), InConstantPool(false), OptimizationGoals(-1) {} void ARMAsmPrinter::EmitFunctionBodyEnd() { // Make sure to terminate any constant pools that were at the end diff --git a/lib/Target/ARM/ARMHazardRecognizer.h b/lib/Target/ARM/ARMHazardRecognizer.h index b5ac694e01f..ca02cc739e1 100644 --- a/lib/Target/ARM/ARMHazardRecognizer.h +++ b/lib/Target/ARM/ARMHazardRecognizer.h @@ -27,14 +27,13 @@ class MachineInstr; /// ARM preRA scheduler uses an unspecialized instance of the /// ScoreboardHazardRecognizer. class ARMHazardRecognizer : public ScoreboardHazardRecognizer { - MachineInstr *LastMI; - unsigned FpMLxStalls; + MachineInstr *LastMI = nullptr; + unsigned FpMLxStalls = 0; public: ARMHazardRecognizer(const InstrItineraryData *ItinData, const ScheduleDAG *DAG) - : ScoreboardHazardRecognizer(ItinData, DAG, "post-RA-sched"), - LastMI(nullptr) {} + : ScoreboardHazardRecognizer(ItinData, DAG, "post-RA-sched") {} HazardType getHazardType(SUnit *SU, int Stalls) override; void Reset() override;