De-constify pointers to Type since they can't be modified. NFC
[oota-llvm.git] / lib / Target / Mips / MipsCCState.cpp
index f30f3ca8431ce1a3f808968f7f189a50dc3858d0..7fc364c0eb4d84d88b24dff3c1309fc17631e146 100644 (file)
@@ -44,7 +44,7 @@ static bool isF128SoftLibCall(const char *CallSym) {
 
 /// This function returns true if Ty is fp128, {f128} or i128 which was
 /// originally a fp128.
-static bool originalTypeIsF128(const Type *Ty, const SDNode *CallNode) {
+static bool originalTypeIsF128(Type *Ty, const SDNode *CallNode) {
   if (Ty->isFP128Ty())
     return true;
 
@@ -128,11 +128,12 @@ void MipsCCState::PreAnalyzeFormalArgumentsForF128(
     // aren't mapped to an original argument.
     if (Ins[i].Flags.isSRet()) {
       OriginalArgWasF128.push_back(false);
+      OriginalArgWasFloat.push_back(false);
       continue;
     }
 
-    assert(Ins[i].OrigArgIndex < MF.getFunction()->arg_size());
-    std::advance(FuncArg, Ins[i].OrigArgIndex);
+    assert(Ins[i].getOrigArgIndex() < MF.getFunction()->arg_size());
+    std::advance(FuncArg, Ins[i].getOrigArgIndex());
 
     OriginalArgWasF128.push_back(
         originalTypeIsF128(FuncArg->getType(), nullptr));