From: Chris Lattner Date: Sat, 13 Oct 2001 06:51:01 +0000 (+0000) Subject: * Fix privacy issues on RegToRefVecMap X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=80c685ff1569c899cc941297882af52ea1186579;p=oota-llvm.git * Fix privacy issues on RegToRefVecMap * Fix initialization order problems... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@762 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/InstrSched/SchedGraph.cpp b/lib/CodeGen/InstrSched/SchedGraph.cpp index c9d01934b04..a326b0fa9a1 100644 --- a/lib/CodeGen/InstrSched/SchedGraph.cpp +++ b/lib/CodeGen/InstrSched/SchedGraph.cpp @@ -31,7 +31,7 @@ typedef vector< pair > RefVec; // The following needs to be a class, not a typedef, so we can use // an opaque declaration in SchedGraph.h -class RegToRefVecMap: public hash_map { +struct RegToRefVecMap: public hash_map { typedef hash_map:: iterator iterator; typedef hash_map::const_iterator const_iterator; }; @@ -50,8 +50,8 @@ SchedGraphEdge::SchedGraphEdge(SchedGraphNode* _src, sink(_sink), depType(_depType), depOrderType(_depOrderType), - val(NULL), - minDelay((_minDelay >= 0)? _minDelay : _src->getLatency()) + minDelay((_minDelay >= 0)? _minDelay : _src->getLatency()), + val(NULL) { src->addOutEdge(this); sink->addInEdge(this); @@ -68,8 +68,8 @@ SchedGraphEdge::SchedGraphEdge(SchedGraphNode* _src, sink(_sink), depType(DefUseDep), depOrderType(_depOrderType), - val(_val), - minDelay((_minDelay >= 0)? _minDelay : _src->getLatency()) + minDelay((_minDelay >= 0)? _minDelay : _src->getLatency()), + val(_val) { src->addOutEdge(this); sink->addInEdge(this); diff --git a/lib/Target/SparcV9/InstrSched/SchedGraph.cpp b/lib/Target/SparcV9/InstrSched/SchedGraph.cpp index c9d01934b04..a326b0fa9a1 100644 --- a/lib/Target/SparcV9/InstrSched/SchedGraph.cpp +++ b/lib/Target/SparcV9/InstrSched/SchedGraph.cpp @@ -31,7 +31,7 @@ typedef vector< pair > RefVec; // The following needs to be a class, not a typedef, so we can use // an opaque declaration in SchedGraph.h -class RegToRefVecMap: public hash_map { +struct RegToRefVecMap: public hash_map { typedef hash_map:: iterator iterator; typedef hash_map::const_iterator const_iterator; }; @@ -50,8 +50,8 @@ SchedGraphEdge::SchedGraphEdge(SchedGraphNode* _src, sink(_sink), depType(_depType), depOrderType(_depOrderType), - val(NULL), - minDelay((_minDelay >= 0)? _minDelay : _src->getLatency()) + minDelay((_minDelay >= 0)? _minDelay : _src->getLatency()), + val(NULL) { src->addOutEdge(this); sink->addInEdge(this); @@ -68,8 +68,8 @@ SchedGraphEdge::SchedGraphEdge(SchedGraphNode* _src, sink(_sink), depType(DefUseDep), depOrderType(_depOrderType), - val(_val), - minDelay((_minDelay >= 0)? _minDelay : _src->getLatency()) + minDelay((_minDelay >= 0)? _minDelay : _src->getLatency()), + val(_val) { src->addOutEdge(this); sink->addInEdge(this);