Make llvm-extract preserve the callingconv of prototypes in the extracted
code.
llvm-svn: 33500
diff --git a/llvm/lib/Transforms/IPO/ExtractFunction.cpp b/llvm/lib/Transforms/IPO/ExtractFunction.cpp
index 69d0926..a871c4d 100644
--- a/llvm/lib/Transforms/IPO/ExtractFunction.cpp
+++ b/llvm/lib/Transforms/IPO/ExtractFunction.cpp
@@ -70,6 +70,7 @@
Function *New = new Function(I->getFunctionType(),
GlobalValue::ExternalLinkage,
I->getName());
+ New->setCallingConv(I->getCallingConv());
I->setName(""); // Remove Old name
// If it's not the named function, delete the body of the function