diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-05 06:25:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-05 06:25:06 +0000 |
commit | a9e7fe9ea2896c056dd806cd47d0d4d1edbd28c2 (patch) | |
tree | c1fd84b4ee70239a6afa56a63976106764ada193 /llvm/lib | |
parent | b5b9ba6ff697976594e69a8d5c8931675f3c7672 (diff) | |
download | bcm5719-llvm-a9e7fe9ea2896c056dd806cd47d0d4d1edbd28c2.tar.gz bcm5719-llvm-a9e7fe9ea2896c056dd806cd47d0d4d1edbd28c2.zip |
Do not use a class before it is defined.
Be gcc 3.4 clean
llvm-svn: 9727
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp index 2a2ef27a29f..a50439de7f6 100644 --- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -111,10 +111,7 @@ public: 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,11 +198,17 @@ public: // accessor functions to query chosen schedule } 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*/ InstrSchedule::InstrSchedule(unsigned int _nslots, unsigned int _numNodes) |