This change removes an "initialization" warning.
authorJack Carter <jcarter@mips.com>
Wed, 11 Jul 2012 21:41:49 +0000 (21:41 +0000)
committerJack Carter <jcarter@mips.com>
Wed, 11 Jul 2012 21:41:49 +0000 (21:41 +0000)
Even though variable in question could not
be initialized before use, the code was such that
the compiler had no way of knowing that.

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

lib/Target/Mips/MipsAsmPrinter.cpp

index 3c50bae071af96ba8ac1b7fa56d470360cad007c..4dac59105de35e029410675f64e3943f2a4f6703 100644 (file)
@@ -353,10 +353,9 @@ bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum,
         }
         return true;
       }
-      unsigned RegOp;
-      if (Subtarget->isGP64bit())
-        RegOp = OpNum;
-      else {
+
+      unsigned RegOp = OpNum;
+      if (!Subtarget->isGP64bit()){
         // Endianess reverses which register holds the high or low value
         switch(ExtraCode[0]) {
         case 'D':