diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-03-23 16:03:00 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-03-23 16:03:00 +0000 |
commit | d38b3fb1277e108de85a7ebbc62792d0e16b4d4a (patch) | |
tree | 130c5f385e876b4c1cda5613c0c0ef4f50d5d525 /llvm/lib | |
parent | 17fb49146937a85ba0c555ed571317c665301a81 (diff) | |
download | bcm5719-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.cpp | 3 |
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. |