[llvm] r183512 - Fold variable that's only used in assert into the assert.

Benjamin Kramer benny.kra at googlemail.com
Fri Jun 7 04:23:35 PDT 2013


Author: d0k
Date: Fri Jun  7 06:23:35 2013
New Revision: 183512

URL: http://llvm.org/viewvc/llvm-project?rev=183512&view=rev
Log:
Fold variable that's only used in assert into the assert.

Avoids unused variable warnings in Release builds.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp?rev=183512&r1=183511&r2=183512&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp Fri Jun  7 06:23:35 2013
@@ -74,8 +74,7 @@ ScheduleHazardRecognizer *PPCInstrInfo::
   // Most subtargets use a PPC970 recognizer.
   if (Directive != PPC::DIR_440 && Directive != PPC::DIR_A2 &&
       Directive != PPC::DIR_E500mc && Directive != PPC::DIR_E5500) {
-    const TargetInstrInfo *TII = TM.getInstrInfo();
-    assert(TII && "No InstrInfo?");
+    assert(TM.getInstrInfo() && "No InstrInfo?");
 
     return new PPCHazardRecognizer970(TM);
   }





More information about the llvm-commits mailing list