New testcase that crashes the ppc backend
[oota-llvm.git] / lib / Linker / LinkModules.cpp
index 6daf06104896ce8fa5e4d1cd94388f793948ab3d..d20044fa3c872db79f8495f9608731a6ce43d7c3 100644 (file)
@@ -600,6 +600,7 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src,
       // 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.
@@ -898,7 +899,7 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
   // 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());