]> granicus.if.org Git - llvm/commitdiff
Move "(void)variable" closer to the assertion that uses it, NFC
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 19 Sep 2017 17:47:53 +0000 (17:47 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 19 Sep 2017 17:47:53 +0000 (17:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313649 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/RegisterInfoEmitter.cpp

index 92fa270c0fbb41e3a26df09d3cf77ff6dcd49c43..5b2659d64ef736828eea45c30225a4ecd8640dd2 100644 (file)
@@ -1236,7 +1236,6 @@ RegisterInfoEmitter::runTargetDesc(raw_ostream &OS, CodeGenTarget &Target,
        << " = {\n";
     for (unsigned M = 0; M < NumModes; ++M) {
       unsigned EV = 0;
-      (void)EV;
       OS << "  // Mode = " << M << " (";
       if (M == 0)
         OS << "Default";
@@ -1245,6 +1244,7 @@ RegisterInfoEmitter::runTargetDesc(raw_ostream &OS, CodeGenTarget &Target,
       OS << ")\n";
       for (const auto &RC : RegisterClasses) {
         assert(RC.EnumValue == EV++ && "Unexpected order of register classes");
+        (void)EV;
         const RegSizeInfo &RI = RC.RSI.get(M);
         OS << "  { " << RI.RegSize << ", " << RI.SpillSize << ", "
            << RI.SpillAlignment;