<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Mar 14, 2015 at 6:40 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dblaikie<br>
Date: Sat Mar 14 20:40:42 2015<br>
New Revision: 232303<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=232303&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=232303&view=rev</a><br>
Log:<br>
Remove use of a reserved identifier<br>
<br>
(& some unnecessary 'inline' keywords, too)<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/Analysis/ConstantsScanner.h<br>
<br>
Modified: llvm/trunk/include/llvm/Analysis/ConstantsScanner.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ConstantsScanner.h?rev=232303&r1=232302&r2=232303&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ConstantsScanner.h?rev=232303&r1=232302&r2=232303&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Analysis/ConstantsScanner.h (original)<br>
+++ llvm/trunk/include/llvm/Analysis/ConstantsScanner.h Sat Mar 14 20:40:42 2015<br>
@@ -27,37 +27,36 @@ class constant_iterator : public std::it<br>
   const_inst_iterator InstI;                // Method instruction iterator<br>
   unsigned OpIdx;                           // Operand index<br>
<br>
-  typedef constant_iterator _Self;<br>
-<br>
-  inline bool isAtConstant() const {<br>
+  bool isAtConstant() const {<br>
     assert(!InstI.atEnd() && OpIdx < InstI->getNumOperands() &&<br>
            "isAtConstant called with invalid arguments!");<br>
     return isa<Constant>(InstI->getOperand(OpIdx));<br>
   }<br>
<br>
 public:<br>
-  inline constant_iterator(const Function *F) : InstI(inst_begin(F)), OpIdx(0) {<br>
+  constant_iterator(const Function *F) : InstI(inst_begin(F)), OpIdx(0) {<br>
     // Advance to first constant... if we are not already at constant or end<br>
     if (InstI != inst_end(F) &&                            // InstI is valid?<br>
         (InstI->getNumOperands() == 0 || !isAtConstant())) // Not at constant?<br>
       operator++();<br>
   }<br>
<br>
-  inline constant_iterator(const Function *F, bool)   // end ctor<br>
-    : InstI(inst_end(F)), OpIdx(0) {<br>
-  }<br>
+  constant_iterator(const Function *F, bool) // end ctor<br>
+      : InstI(inst_end(F)),<br>
+        OpIdx(0) {}<br>
<br>
-  inline bool operator==(const _Self& x) const { return OpIdx == x.OpIdx &&<br>
-                                                        InstI == x.InstI; }<br>
-  inline bool operator!=(const _Self& x) const { return !operator==(x); }<br>
+  bool operator==(const constant_iterator &x) const {<br>
+    return OpIdx == x.OpIdx && InstI == x.InstI;<br>
+  }<br>
+  bool operator!=(const constant_iterator &x) const { return !(*this == x); }<br>
<br>
-  inline pointer operator*() const {<br>
+  pointer operator*() const {<br>
     assert(isAtConstant() && "Dereferenced an iterator at the end!");<br>
     return cast<Constant>(InstI->getOperand(OpIdx));<br>
   }<br>
-  inline pointer operator->() const { return operator*(); }<br>
+  pointer operator->() const { return **this; }<br>
<br>
-  inline _Self& operator++() {   // Preincrement implementation<br>
+  constant_iterator &operator++() { // Preincrement implementation<br>
     ++OpIdx;<br>
     do {<br>
       unsigned NumOperands = InstI->getNumOperands();<br>
@@ -73,11 +72,13 @@ public:<br>
     return *this;  // At the end of the method<br>
   }<br>
<br>
-  inline _Self operator++(int) { // Postincrement<br>
-    _Self tmp = *this; ++*this; return tmp;<br>
+  onstant_iterator operator++(int) { // Postincrement<br></blockquote><div><br></div><div>Typo "onstant_iterator".</div><div><br></div><div>Given that this didn't cause any build breakage (apart from in the modules buildbot), can we just delete this file?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+    constant_iterator tmp = *this;<br>
+    ++*this;<br>
+    return tmp;<br>
   }<br>
<br>
-  inline bool atEnd() const { return InstI.atEnd(); }<br>
+  bool atEnd() const { return InstI.atEnd(); }<br>
 };<br>
<br>
 inline constant_iterator constant_begin(const Function *F) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>