Dear LLVM, 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? Thanks, xiaodong
> 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/
I just recompiled the opt executable, but when trying to load a dynamic module I get the following error: % opt -load $LLVM_DIR/lib/Debug/libdsgraphshow.so --help Error opening '/usr/dcs/projects/cs426/juanruiz/llvm/lib/Debug/libdsgraphshow.so': ld.so.1: opt: fatal: relocation error: file /usr/dcs/projects/cs426/juanruiz/llvm/lib/Debug/libdsgraphshow.so: symbol _ZN7DSGraphC1ER8FunctionPS_: referenced symbol not found -load request ignored. $LLVM_DIR points to the right directory, libdsgraphshow.so exists and is in the right place, and both opt and libdsgraphshow.so are freshly recompiled. Any ideas?