llvm.org GIT mirror llvm / 98fd7f6
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 Bill Wendling 11 years ago
4 changed file(s) with 18 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
9999 }
100100
101101 void destroySentinel(NodeTy *N) {
102 assert(N == &Sentinel);
102 assert(N == &Sentinel); N = N;
103103 Sentinel.setPrev(0);
104104 Sentinel.setNext(0);
105105 }
106106
107 void addNodeToList(NodeTy *N) {}
108 void removeNodeFromList(NodeTy *N) {}
109 void transferNodesFromList(iplist &L2,
110 ilist_iterator first,
111 ilist_iterator last) {}
107 void addNodeToList(NodeTy *) {}
108 void removeNodeFromList(NodeTy *) {}
109 void transferNodesFromList(iplist &,
110 ilist_iterator /*first*/,
111 ilist_iterator /*last*/) {}
112112
113113 // Ideally we wouldn't implement this, but ilist's clear calls it,
114114 // which is called from ilist's destructor. We won't ever call
115115 // either of those with a non-empty list, but statically this
116116 // method needs to exist.
117 void deleteNode(NodeTy *N) { assert(0); }
117 void deleteNode(NodeTy *) { assert(0); }
118118
119119 private:
120120 static NodeTy *createNode(const NodeTy &V); // do not implement
22302230 // Allocate the allocator immediately inside the traits class.
22312231 AllocatorType Allocator;
22322232
2233 void addNodeToList(SDNode* N) {}
2234 void removeNodeFromList(SDNode* N) {}
2233 void addNodeToList(SDNode*) {}
2234 void removeNodeFromList(SDNode*) {}
22352235 void transferNodesFromList(alist_traits &, iterator, iterator) {}
22362236 void deleteNode(SDNode *N) {
22372237 N->~SDNode();
185185 bool doesNotAccessMemory() const {
186186 return paramHasAttr(0, ParamAttr::ReadNone);
187187 }
188 void setDoesNotAccessMemory(bool doesNotAccessMemory = true) {
189 if (doesNotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
188 void setDoesNotAccessMemory(bool DoesNotAccessMemory = true) {
189 if (DoesNotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
190190 else removeParamAttr(0, ParamAttr::ReadNone);
191191 }
192192
194194 bool onlyReadsMemory() const {
195195 return doesNotAccessMemory() || paramHasAttr(0, ParamAttr::ReadOnly);
196196 }
197 void setOnlyReadsMemory(bool onlyReadsMemory = true) {
198 if (onlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
197 void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
198 if (OnlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
199199 else removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
200200 }
201201
203203 bool doesNotReturn() const {
204204 return paramHasAttr(0, ParamAttr::NoReturn);
205205 }
206 void setDoesNotReturn(bool doesNotReturn = true) {
207 if (doesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
206 void setDoesNotReturn(bool DoesNotReturn = true) {
207 if (DoesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
208208 else removeParamAttr(0, ParamAttr::NoReturn);
209209 }
210210
212212 bool doesNotThrow() const {
213213 return paramHasAttr(0, ParamAttr::NoUnwind);
214214 }
215 void setDoesNotThrow(bool doesNotThrow = true) {
216 if (doesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
215 void setDoesNotThrow(bool DoesNotThrow = true) {
216 if (DoesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
217217 else removeParamAttr(0, ParamAttr::NoUnwind);
218218 }
219219
7878 }
7979
8080 template
81 void Deallocate(AllocatorType &Allocator, SubClass* Element) {
81 void Deallocate(AllocatorType & /*Allocator*/, SubClass* Element) {
8282 NodeTy *N = NodeTy::getNode(Element);
8383 assert(N->getPrev() == 0);
8484 assert(N->getNext() == 0);