From a2edd7e4499e281bcefc558efc464917d32619c9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 9 May 2005 01:09:39 +0000 Subject: [PATCH] Preserve CC's when linking modules llvm-svn: 21799 --- lib/Linker/LinkModules.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 6daf0610489..23ba6ebf58f 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -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.