From: Anton Korobeynikov Date: Sun, 23 Mar 2008 16:03:00 +0000 (+0000) Subject: Preserve calling convention during function cloning X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9e49f1bc582a709349295c00c585246558c52958;p=oota-llvm.git Preserve calling convention during function cloning git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48708 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 976dda45bf6..7387144b5ee 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -83,6 +83,9 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, // Clone the parameter attributes NewFunc->setParamAttrs(OldFunc->getParamAttrs()); + // Clone the calling convention + NewFunc->setCallingConv(OldFunc->getCallingConv()); + // Loop over all of the basic blocks in the function, cloning them as // appropriate. Note that we save BE this way in order to handle cloning of // recursive functions into themselves.