]> granicus.if.org Git - llvm/commitdiff
[X86] Fix uninitialized members in constructor warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 6 May 2019 14:48:02 +0000 (14:48 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 6 May 2019 14:48:02 +0000 (14:48 +0000)
Initialize all member variables in X86ATTInstPrinter and X86DAGToDAGISel constructors to fix cppcheck warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360047 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/InstPrinter/X86ATTInstPrinter.h
lib/Target/X86/X86ISelDAGToDAG.cpp

index 498a9d17b06f77de8f5f890e0cc8aa2b56214ef3..ff4e8babc5702a03cd63a217848722cf29ff2579 100644 (file)
@@ -21,7 +21,7 @@ class X86ATTInstPrinter final : public X86InstPrinterCommon {
 public:
   X86ATTInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
                     const MCRegisterInfo &MRI)
-      : X86InstPrinterCommon(MAI, MII, MRI) {}
+      : X86InstPrinterCommon(MAI, MII, MRI), HasCustomInstComment(false) {}
 
   void printRegName(raw_ostream &OS, unsigned RegNo) const override;
   void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot,
index 230bf639013942dfbbc8c5d4bf56ceb06eff6698..3c6dfb45a567fabd93cecf28f376f836796eb5a0 100644 (file)
@@ -169,8 +169,8 @@ namespace {
 
   public:
     explicit X86DAGToDAGISel(X86TargetMachine &tm, CodeGenOpt::Level OptLevel)
-        : SelectionDAGISel(tm, OptLevel), OptForSize(false),
-          OptForMinSize(false) {}
+        : SelectionDAGISel(tm, OptLevel), Subtarget(nullptr), OptForSize(false),
+          OptForMinSize(false), IndirectTlsSegRefs(false) {}
 
     StringRef getPassName() const override {
       return "X86 DAG->DAG Instruction Selection";