When I try to do this: GetElementPtrInst *newIns = new GetElementPtrInst( ... ); OldIns->ReplaceAllUsesWith( newIns ); When I compile the code, it always says, no matching function for call to `GetElementPtrInst::ReplaceAllUsesWith (GetElementPtrInst *&)' But since GetElementPtrInst is a subclass of Value, why cannot use this way? What's wrong here? thanks, xiaodong
> When I try to do this: > GetElementPtrInst *newIns = new GetElementPtrInst( ... ); > OldIns->ReplaceAllUsesWith( newIns ); > When I compile the code, it always says, no matching function > for call to `GetElementPtrInst::ReplaceAllUsesWith > (GetElementPtrInst *&)'C++ is case sensitive. Try replaceAllUsesWith. -Chris http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/