[LLVMdev] CloneModule ValueMap
nicholas at mxc.ca
Mon May 15 17:45:45 PDT 2006
After cloning a Module with CloneModule, there doesn't seem to be any
easy way to convert a Value pointing into the old Module to a Value
pointing into the new one.
The CloneModule implementation already has to keep such a mapping
internally, so I've written a patch that exposes it as a second inout
parameter to CloneModule(), with the one param version being a simple
wrapper for backward compatibility.
The type of ValueMap is std::map<const Value *, Value*> and the
semantics are simply:
Value *New = ValueMap[Old];
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2138 bytes
Desc: not available
More information about the llvm-dev