[llvm-commits] CVS: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Nov 5 00:26:02 PST 2003


Changes in directory llvm/lib/CodeGen/InstrSched:

InstrScheduling.cpp updated: 1.60 -> 1.61

---
Log message:

Do not use a class before it is defined.
Be gcc 3.4 clean


---
Diffs of the changes:  (+9 -6)

Index: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
diff -u llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.60 llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.61
--- llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.60	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp	Wed Nov  5 00:25:06 2003
@@ -111,10 +111,7 @@
   
   inline bool operator!=(const _Self& x) const { return !operator==(x); }
   
-  inline _NodeType* operator*() const {
-    assert(cycleNum < S.groups.size());
-    return (*S.groups[cycleNum])[slotNum];
-  }
+  inline _NodeType* operator*() const;
   inline _NodeType* operator->() const { return operator*(); }
   
          _Self& operator++();				// Preincrement
@@ -201,10 +198,16 @@
   }
   
 private:
-  friend class iterator;
-  friend class const_iterator;
+  friend class ScheduleIterator<SchedGraphNode>;
+  friend class ScheduleIterator<const SchedGraphNode>;
   /*ctor*/	InstrSchedule	();	// Disable: DO NOT IMPLEMENT.
 };
+
+template<class NodeType>
+inline NodeType *ScheduleIterator<NodeType>::operator*() const {
+  assert(cycleNum < S.groups.size());
+  return (*S.groups[cycleNum])[slotNum];
+}
 
 
 /*ctor*/





More information about the llvm-commits mailing list