Move InstrSchedule's iterator begin/end methods inline.
authorBrian Gaeke <gaeke@uiuc.edu>
Mon, 9 Feb 2004 18:42:46 +0000 (18:42 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Mon, 9 Feb 2004 18:42:46 +0000 (18:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11239 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/InstrSched/InstrScheduling.cpp
lib/Target/SparcV9/InstrSched/InstrScheduling.cpp

index 4e2bf4787632697984c31df772de4e7dccce06bd..9cec481ab0bea27db8dbae48b21ce7b99feaa96b 100644 (file)
@@ -149,10 +149,10 @@ public: // iterators
   typedef ScheduleIterator<SchedGraphNode> iterator;
   typedef ScheduleIterator<const SchedGraphNode> const_iterator;
   
-        iterator begin();
-  const_iterator begin() const;
-        iterator end();
-  const_iterator end()   const;
+        iterator begin()       { return iterator::begin(*this); }
+  const_iterator begin() const { return const_iterator::begin(*this); }
+        iterator end()         { return iterator::end(*this); }
+  const_iterator end() const   { return const_iterator::end(*this); }
   
 public: // constructors and destructor
   /*ctor*/             InstrSchedule   (unsigned int _nslots,
@@ -280,30 +280,6 @@ ScheduleIterator<_NodeType>::end(const InstrSchedule& _schedule)
   return _Self(_schedule, _schedule.groups.size(), 0);
 }
 
-InstrSchedule::iterator
-InstrSchedule::begin()
-{
-  return iterator::begin(*this);
-}
-
-InstrSchedule::const_iterator
-InstrSchedule::begin() const
-{
-  return const_iterator::begin(*this);
-}
-
-InstrSchedule::iterator
-InstrSchedule::end()
-{
-  return iterator::end(*this);
-}
-
-InstrSchedule::const_iterator
-InstrSchedule::end() const
-{
-  return const_iterator::end(  *this);
-}
-
 
 //----------------------------------------------------------------------
 // class DelaySlotInfo:
index 4e2bf4787632697984c31df772de4e7dccce06bd..9cec481ab0bea27db8dbae48b21ce7b99feaa96b 100644 (file)
@@ -149,10 +149,10 @@ public: // iterators
   typedef ScheduleIterator<SchedGraphNode> iterator;
   typedef ScheduleIterator<const SchedGraphNode> const_iterator;
   
-        iterator begin();
-  const_iterator begin() const;
-        iterator end();
-  const_iterator end()   const;
+        iterator begin()       { return iterator::begin(*this); }
+  const_iterator begin() const { return const_iterator::begin(*this); }
+        iterator end()         { return iterator::end(*this); }
+  const_iterator end() const   { return const_iterator::end(*this); }
   
 public: // constructors and destructor
   /*ctor*/             InstrSchedule   (unsigned int _nslots,
@@ -280,30 +280,6 @@ ScheduleIterator<_NodeType>::end(const InstrSchedule& _schedule)
   return _Self(_schedule, _schedule.groups.size(), 0);
 }
 
-InstrSchedule::iterator
-InstrSchedule::begin()
-{
-  return iterator::begin(*this);
-}
-
-InstrSchedule::const_iterator
-InstrSchedule::begin() const
-{
-  return const_iterator::begin(*this);
-}
-
-InstrSchedule::iterator
-InstrSchedule::end()
-{
-  return iterator::end(*this);
-}
-
-InstrSchedule::const_iterator
-InstrSchedule::end() const
-{
-  return const_iterator::end(  *this);
-}
-
 
 //----------------------------------------------------------------------
 // class DelaySlotInfo: