[llvm] r343071 - Silence compiler warning about unused variable introduced in r343018

Mikael Holmen via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 23:19:08 PDT 2018


Author: uabelho
Date: Tue Sep 25 23:19:08 2018
New Revision: 343071

URL: http://llvm.org/viewvc/llvm-project?rev=343071&view=rev
Log:
Silence compiler warning about unused variable introduced in r343018

Since the body of the "else if" contains
 // TODO
I suppose someone will need the variable again at some point, but with
-Werror the warning made it not compile at all.

Modified:
    llvm/trunk/lib/CodeGen/MachineFunction.cpp

Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=343071&r1=343070&r2=343071&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue Sep 25 23:19:08 2018
@@ -657,7 +657,7 @@ MCSymbol *MachineFunction::addLandingPad
       }
     }
 
-  } else if (const auto *CPI = dyn_cast<CatchPadInst>(FirstI)) {
+  } else if (isa<CatchPadInst>(FirstI)) {
     // TODO
 
   } else {




More information about the llvm-commits mailing list