summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-23 16:03:00 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-23 16:03:00 +0000
commitd38b3fb1277e108de85a7ebbc62792d0e16b4d4a (patch)
tree130c5f385e876b4c1cda5613c0c0ef4f50d5d525 /llvm/lib
parent17fb49146937a85ba0c555ed571317c665301a81 (diff)
downloadbcm5719-llvm-d38b3fb1277e108de85a7ebbc62792d0e16b4d4a.tar.gz
bcm5719-llvm-d38b3fb1277e108de85a7ebbc62792d0e16b4d4a.zip
Preserve calling convention during function cloning
llvm-svn: 48708
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 976dda45bf6..7387144b5ee 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud