[llvm] r195793 - [PM] [cleanup] Replace a reserved identifier "_Self" with the injected

Chandler Carruth chandlerc at gmail.com
Tue Nov 26 14:36:42 PST 2013


Author: chandlerc
Date: Tue Nov 26 16:36:41 2013
New Revision: 195793

URL: http://llvm.org/viewvc/llvm-project?rev=195793&view=rev
Log:
[PM] [cleanup] Replace a reserved identifier "_Self" with the injected
class name. I think we're no longer using any compilers with
sufficiently broken ICN for this use case, but I'll watch the bots and
introduce a typedef without a reserved name if any yell at me.

Modified:
    llvm/trunk/include/llvm/ADT/SCCIterator.h

Modified: llvm/trunk/include/llvm/ADT/SCCIterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SCCIterator.h?rev=195793&r1=195792&r2=195793&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SCCIterator.h (original)
+++ llvm/trunk/include/llvm/ADT/SCCIterator.h Tue Nov 26 16:36:41 2013
@@ -145,12 +145,10 @@ class scc_iterator
   inline scc_iterator() {}
 
 public:
-  typedef scc_iterator<GraphT, GT> _Self;
-
-  static inline _Self begin(const GraphT &G) {
-    return _Self(GT::getEntryNode(G));
+  static inline scc_iterator begin(const GraphT &G) {
+    return scc_iterator(GT::getEntryNode(G));
   }
-  static inline _Self end(const GraphT &) { return _Self(); }
+  static inline scc_iterator end(const GraphT &) { return scc_iterator(); }
 
   /// \brief Direct loop termination test which is more efficient than
   /// comparison with \c end().
@@ -159,17 +157,17 @@ public:
     return CurrentSCC.empty();
   }
 
-  inline bool operator==(const _Self &x) const {
+  inline bool operator==(const scc_iterator &x) const {
     return VisitStack == x.VisitStack && CurrentSCC == x.CurrentSCC;
   }
-  inline bool operator!=(const _Self &x) const { return !operator==(x); }
+  inline bool operator!=(const scc_iterator &x) const { return !operator==(x); }
 
-  inline _Self &operator++() {
+  inline scc_iterator &operator++() {
     GetNextSCC();
     return *this;
   }
-  inline _Self operator++(int) {
-    _Self tmp = *this;
+  inline scc_iterator operator++(int) {
+    scc_iterator tmp = *this;
     ++*this;
     return tmp;
   }





More information about the llvm-commits mailing list