[llvm-commits] [llvm] r108088 - in /llvm/trunk/lib: CodeGen/PBQP/Heuristics/Briggs.h Target/MSP430/MSP430RegisterInfo.cpp

Chandler Carruth chandlerc at gmail.com
Sun Jul 11 01:18:12 PDT 2010


Author: chandlerc
Date: Sun Jul 11 03:18:12 2010
New Revision: 108088

URL: http://llvm.org/viewvc/llvm-project?rev=108088&view=rev
Log:
Remove two other uses of ATTRIBUTE_UNUSED for variables only used within
assert()s, switching to void-casts. Removed an unneeded Compiler.h include as
a result. There are two other uses in LLVM, but they're not due to assert()s,
so I've left them alone.

Modified:
    llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h
    llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp

Modified: llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h?rev=108088&r1=108087&r2=108088&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h (original)
+++ llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h Sun Jul 11 03:18:12 2010
@@ -18,7 +18,6 @@
 #ifndef LLVM_CODEGEN_PBQP_HEURISTICS_BRIGGS_H
 #define LLVM_CODEGEN_PBQP_HEURISTICS_BRIGGS_H
 
-#include "llvm/Support/Compiler.h"
 #include "../HeuristicSolver.h"
 #include "../HeuristicBase.h"
 
@@ -267,8 +266,8 @@
         if (!nd.isHeuristic)
           return;
 
-        EdgeData &ed ATTRIBUTE_UNUSED = getHeuristicEdgeData(eItr);
-
+        EdgeData &ed = getHeuristicEdgeData(eItr);
+        (void)ed;
         assert(ed.isUpToDate && "Edge data is not up to date.");
 
         // Update node.

Modified: llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp?rev=108088&r1=108087&r2=108088&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp Sun Jul 11 03:18:12 2010
@@ -228,8 +228,8 @@
                                                                          const {
   // Create a frame entry for the FPW register that must be saved.
   if (hasFP(MF)) {
-    int ATTRIBUTE_UNUSED FrameIdx =
-      MF.getFrameInfo()->CreateFixedObject(2, -4, true);
+    int FrameIdx = MF.getFrameInfo()->CreateFixedObject(2, -4, true);
+    (void)FrameIdx;
     assert(FrameIdx == MF.getFrameInfo()->getObjectIndexBegin() &&
            "Slot for FPW register must be last in order to be found!");
   }





More information about the llvm-commits mailing list