[mips] Fix use of uninitialized value reported by the sanitizer-x86_64-linux-bootstra...
authorDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 31 Mar 2014 15:58:58 +0000 (15:58 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 31 Mar 2014 15:58:58 +0000 (15:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205213 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/AsmParser/MipsAsmParser.cpp

index 4147675772107f6501b658336d8619199201c73c..2b80d3f03de30a3aa04af1f39a96677f012f8da8 100644 (file)
@@ -467,6 +467,7 @@ public:
   static MipsOperand *CreateReg(unsigned RegNum, SMLoc S, SMLoc E) {
     MipsOperand *Op = new MipsOperand(k_Register);
     Op->Reg.RegNum = RegNum;
+    Op->Reg.Kind = Kind_None;
     Op->StartLoc = S;
     Op->EndLoc = E;
     return Op;
@@ -475,6 +476,7 @@ public:
   static MipsOperand *CreatePtrReg(unsigned RegNum, SMLoc S, SMLoc E) {
     MipsOperand *Op = new MipsOperand(k_PtrReg);
     Op->Reg.RegNum = RegNum;
+    Op->Reg.Kind = Kind_None;
     Op->StartLoc = S;
     Op->EndLoc = E;
     return Op;