From 98fd7f6b2f109e16abf3e4279c971f8d3703b8a6 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 10 Jul 2008 22:57:49 +0000 Subject: [PATCH] Pull r53428 from Gaz into mainline: Remove warnings about unused/shadowed variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53430 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/alist_node.h | 14 +++++++------- include/llvm/CodeGen/SelectionDAGNodes.h | 4 ++-- include/llvm/Function.h | 16 ++++++++-------- include/llvm/Support/Recycler.h | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/llvm/ADT/alist_node.h b/include/llvm/ADT/alist_node.h index 03c66f607fc..1b877c0c215 100644 --- a/include/llvm/ADT/alist_node.h +++ b/include/llvm/ADT/alist_node.h @@ -100,22 +100,22 @@ public: } 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 &L2, - ilist_iterator first, - ilist_iterator last) {} + void addNodeToList(NodeTy *) {} + void removeNodeFromList(NodeTy *) {} + void transferNodesFromList(iplist &, + ilist_iterator /*first*/, + ilist_iterator /*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 diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 46edb5a39e0..d1363e9ec3f 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -2231,8 +2231,8 @@ public: // 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(); diff --git a/include/llvm/Function.h b/include/llvm/Function.h index f48eb38d1da..2ec38e1d007 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -186,8 +186,8 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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); } diff --git a/include/llvm/Support/Recycler.h b/include/llvm/Support/Recycler.h index 8d4dc4ca406..4750a6d178f 100644 --- a/include/llvm/Support/Recycler.h +++ b/include/llvm/Support/Recycler.h @@ -79,7 +79,7 @@ public: } template - 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); -- 2.34.1