Preserve CC's when linking modules

llvm-svn: 21799
This commit is contained in:
Chris Lattner 2005-05-09 01:09:39 +00:00
parent d0525a29d1
commit e251b5ca89
1 changed files with 1 additions and 0 deletions

View 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.