[llvm-commits] [llvm] r48708 - /llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp

Anton Korobeynikov asl at math.spbu.ru
Sun Mar 23 09:03:03 PDT 2008


Author: asl
Date: Sun Mar 23 11:03:00 2008
New Revision: 48708

URL: http://llvm.org/viewvc/llvm-project?rev=48708&view=rev
Log:
Preserve calling convention during function cloning

Modified:
    llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp

Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp?rev=48708&r1=48707&r2=48708&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Sun Mar 23 11:03:00 2008
@@ -83,6 +83,9 @@
   // 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.





More information about the llvm-commits mailing list