All DSGraphs keep a reference to the targetdata they are created with. This is

used to eliminate the hard coded, hacked in, sparc specific, global TargetData.
Changing the TargetData used to actually match the code fixes problems, and
eliminates a crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2003-11-02 22:27:28 +00:00
parent dbfe36e51e
commit 15869aa2c7
11 changed files with 77 additions and 32 deletions

View File

@@ -18,6 +18,7 @@
template<typename BaseType>
class DSNodeIterator; // Data structure graph traversal iterator
class TargetData;
//===----------------------------------------------------------------------===//
/// DSNode - Data structure node class
@@ -134,6 +135,11 @@ public:
DSGraph *getParentGraph() const { return ParentGraph; }
void setParentGraph(DSGraph *G) { ParentGraph = G; }
/// getTargetData - Get the target data object used to construct this node.
///
const TargetData &getTargetData() const;
/// getForwardNode - This method returns the node that this node is forwarded
/// to, if any.
DSNode *getForwardNode() const { return ForwardNH.getNode(); }