Remove two other uses of ATTRIBUTE_UNUSED for variables only used within
authorChandler Carruth <chandlerc@gmail.com>
Sun, 11 Jul 2010 08:18:12 +0000 (08:18 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 11 Jul 2010 08:18:12 +0000 (08:18 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108088 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PBQP/Heuristics/Briggs.h
lib/Target/MSP430/MSP430RegisterInfo.cpp

index 30d34d9e3e92c39b5403fe0481c67535baefe47f..4c1ce119ed0507cdc18f81ada0f97414e1ce8ce8 100644 (file)
@@ -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 @@ namespace PBQP {
         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.
index e7671f38c6c261591f27bd54212de9dcd43d91fc..608ca49fcf78eeb10177380a5bcf97525068841b 100644 (file)
@@ -228,8 +228,8 @@ MSP430RegisterInfo::processFunctionBeforeFrameFinalized(MachineFunction &MF)
                                                                          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!");
   }