projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8e7416
)
Preserve calling convention during function cloning
author
Anton Korobeynikov
<asl@math.spbu.ru>
Sun, 23 Mar 2008 16:03:00 +0000
(16:03 +0000)
committer
Anton Korobeynikov
<asl@math.spbu.ru>
Sun, 23 Mar 2008 16:03:00 +0000
(16:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48708
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/CloneFunction.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/CloneFunction.cpp
b/lib/Transforms/Utils/CloneFunction.cpp
index 976dda45bf6397b63b587080379720d24073f36a..7387144b5ee7fd9daee9a60f49a0ab69e44a45bf 100644
(file)
--- 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.