summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-09 01:09:39 +0000
committerChris Lattner <sabre@nondot.org>2005-05-09 01:09:39 +0000
commitcb9048a6e813ca0c89f59375f3aa15ae49e153b4 (patch)
tree21ebb627bab2a07366b0d3033d37ad21e57b1330 /lib/Linker
parentf201dbc1a4a638659ec3916785196e2c204c7755 (diff)
downloadllvm-cb9048a6e813ca0c89f59375f3aa15ae49e153b4.tar.gz
llvm-cb9048a6e813ca0c89f59375f3aa15ae49e153b4.tar.bz2
llvm-cb9048a6e813ca0c89f59375f3aa15ae49e153b4.tar.xz
Preserve CC's when linking modules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 6daf061048..23ba6ebf58 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.