[llvm-commits] [llvm] r53428 - in /llvm/branches/Apple/Gaz/include/llvm: ADT/alist_node.h CodeGen/SelectionDAGNodes.h Function.h Support/Recycler.h

Bill Wendling isanbard at gmail.com
Thu Jul 10 15:52:11 PDT 2008


Author: void
Date: Thu Jul 10 17:52:10 2008
New Revision: 53428

URL: http://llvm.org/viewvc/llvm-project?rev=53428&view=rev
Log:
Remove warnings (errors) about shadowed and unused variables.

Modified:
    llvm/branches/Apple/Gaz/include/llvm/ADT/alist_node.h
    llvm/branches/Apple/Gaz/include/llvm/CodeGen/SelectionDAGNodes.h
    llvm/branches/Apple/Gaz/include/llvm/Function.h
    llvm/branches/Apple/Gaz/include/llvm/Support/Recycler.h

Modified: llvm/branches/Apple/Gaz/include/llvm/ADT/alist_node.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Gaz/include/llvm/ADT/alist_node.h?rev=53428&r1=53427&r2=53428&view=diff

==============================================================================
--- llvm/branches/Apple/Gaz/include/llvm/ADT/alist_node.h (original)
+++ llvm/branches/Apple/Gaz/include/llvm/ADT/alist_node.h Thu Jul 10 17:52:10 2008
@@ -100,22 +100,22 @@
   }
 
   void destroySentinel(NodeTy *N) {
-    assert(N == &Sentinel);
+    assert(N == &Sentinel); N = N;
     Sentinel.setPrev(0);
     Sentinel.setNext(0);
   }
 
-  void addNodeToList(NodeTy *N) {}
-  void removeNodeFromList(NodeTy *N) {}
-  void transferNodesFromList(iplist<NodeTy, ilist_traits> &L2,
-                             ilist_iterator<NodeTy> first,
-                             ilist_iterator<NodeTy> last) {}
+  void addNodeToList(NodeTy *) {}
+  void removeNodeFromList(NodeTy *) {}
+  void transferNodesFromList(iplist<NodeTy, ilist_traits> &,
+                             ilist_iterator<NodeTy> /*first*/,
+                             ilist_iterator<NodeTy> /*last*/) {}
 
   // Ideally we wouldn't implement this, but ilist's clear calls it,
   // which is called from ilist's destructor. We won't ever call
   // either of those with a non-empty list, but statically this
   // method needs to exist.
-  void deleteNode(NodeTy *N) { assert(0); }
+  void deleteNode(NodeTy *) { assert(0); }
 
 private:
   static NodeTy *createNode(const NodeTy &V); // do not implement

Modified: llvm/branches/Apple/Gaz/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Gaz/include/llvm/CodeGen/SelectionDAGNodes.h?rev=53428&r1=53427&r2=53428&view=diff

==============================================================================
--- llvm/branches/Apple/Gaz/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/branches/Apple/Gaz/include/llvm/CodeGen/SelectionDAGNodes.h Thu Jul 10 17:52:10 2008
@@ -2218,8 +2218,8 @@
   // Allocate the allocator immediately inside the traits class.
   AllocatorType Allocator;
 
-  void addNodeToList(SDNode* N) {}
-  void removeNodeFromList(SDNode* N) {}
+  void addNodeToList(SDNode*) {}
+  void removeNodeFromList(SDNode*) {}
   void transferNodesFromList(alist_traits &, iterator, iterator) {}
   void deleteNode(SDNode *N) {
     N->~SDNode();

Modified: llvm/branches/Apple/Gaz/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Gaz/include/llvm/Function.h?rev=53428&r1=53427&r2=53428&view=diff

==============================================================================
--- llvm/branches/Apple/Gaz/include/llvm/Function.h (original)
+++ llvm/branches/Apple/Gaz/include/llvm/Function.h Thu Jul 10 17:52:10 2008
@@ -186,8 +186,8 @@
   bool doesNotAccessMemory() const {
     return paramHasAttr(0, ParamAttr::ReadNone);
   }
-  void setDoesNotAccessMemory(bool doesNotAccessMemory = true) {
-    if (doesNotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
+  void setDoesNotAccessMemory(bool DoesNotAccessMemory = true) {
+    if (DoesNotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
     else removeParamAttr(0, ParamAttr::ReadNone);
   }
 
@@ -195,8 +195,8 @@
   bool onlyReadsMemory() const {
     return doesNotAccessMemory() || paramHasAttr(0, ParamAttr::ReadOnly);
   }
-  void setOnlyReadsMemory(bool onlyReadsMemory = true) {
-    if (onlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
+  void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
+    if (OnlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
     else removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
   }
 
@@ -204,8 +204,8 @@
   bool doesNotReturn() const {
     return paramHasAttr(0, ParamAttr::NoReturn);
   }
-  void setDoesNotReturn(bool doesNotReturn = true) {
-    if (doesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
+  void setDoesNotReturn(bool DoesNotReturn = true) {
+    if (DoesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
     else removeParamAttr(0, ParamAttr::NoReturn);
   }
 
@@ -213,8 +213,8 @@
   bool doesNotThrow() const {
     return paramHasAttr(0, ParamAttr::NoUnwind);
   }
-  void setDoesNotThrow(bool doesNotThrow = true) {
-    if (doesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
+  void setDoesNotThrow(bool DoesNotThrow = true) {
+    if (DoesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
     else removeParamAttr(0, ParamAttr::NoUnwind);
   }
 

Modified: llvm/branches/Apple/Gaz/include/llvm/Support/Recycler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Gaz/include/llvm/Support/Recycler.h?rev=53428&r1=53427&r2=53428&view=diff

==============================================================================
--- llvm/branches/Apple/Gaz/include/llvm/Support/Recycler.h (original)
+++ llvm/branches/Apple/Gaz/include/llvm/Support/Recycler.h Thu Jul 10 17:52:10 2008
@@ -80,7 +80,7 @@
   }
 
   template<class SubClass, class AllocatorType>
-  void Deallocate(AllocatorType &Allocator, SubClass* Element) {
+  void Deallocate(AllocatorType & /*Allocator*/, SubClass* Element) {
     NodeTy *N = NodeTy::getNode(Element);
     assert(N->getPrev() == 0);
     assert(N->getNext() == 0);





More information about the llvm-commits mailing list