[llvm] r229250 - Remove a variable only used in an assert and sink its initializer into

Chandler Carruth chandlerc at gmail.com
Sat Feb 14 01:14:44 PST 2015


Author: chandlerc
Date: Sat Feb 14 03:14:44 2015
New Revision: 229250

URL: http://llvm.org/viewvc/llvm-project?rev=229250&view=rev
Log:
Remove a variable only used in an assert and sink its initializer into
the assert. Fixes -Wunused-variable on non-asserts builds.

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

Modified: llvm/trunk/lib/Target/PowerPC/PPCFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCFrameLowering.cpp?rev=229250&r1=229249&r2=229250&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCFrameLowering.cpp Sat Feb 14 03:14:44 2015
@@ -573,10 +573,9 @@ void PPCFrameLowering::emitPrologue(Mach
   // Get processor type.
   bool isPPC64 = Subtarget.isPPC64();
   // Get the ABI.
-  bool isDarwinABI = Subtarget.isDarwinABI();
   bool isSVR4ABI = Subtarget.isSVR4ABI();
   bool isELFv2ABI = Subtarget.isELFv2ABI();
-  assert((isDarwinABI || isSVR4ABI) &&
+  assert((Subtarget.isDarwinABI() || isSVR4ABI) &&
          "Currently only Darwin and SVR4 ABIs are supported for PowerPC.");
 
   // Scan the prolog, looking for an UPDATE_VRSAVE instruction.  If we find it,





More information about the llvm-commits mailing list