// identical to SF into the dest module...
Function *NewDF = new Function(SF->getFunctionType(), SF->getLinkage(),
SF->getName(), Dest);
+ NewDF->setCallingConv(SF->getCallingConv());
// If the LLVM runtime renamed the function, but it is an externally
// visible symbol, DF must be an existing function with internal linkage.
// If the source library's module id is in the dependent library list of the
// destination library, remove it since that module is now linked in.
sys::Path modId;
- modId.setFile(Src->getModuleIdentifier());
+ modId.set(Src->getModuleIdentifier());
if (!modId.isEmpty())
Dest->removeLibrary(modId.getBasename());