[LLVMdev] DSGraph question
Chris Lattner
sabre at nondot.org
Fri Nov 15 16:35:01 PST 2002
> If I have a DSGraph dsg, I want to duplicate a DSgraph which is exactly
> the same with dsg. How should I do that? Should I use DSGraph dsg2 =
> dsg; or use some other methods?
Yes, use the copy constructor. If you want mapping between the original
and the new graph's nodes, you can also use this form of the copy ctor:
DSGraph(const DSGraph &DSG, std::map<const DSNode*, DSNodeHandle> &NodeMap);
See the header file.
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
More information about the llvm-dev
mailing list