From 79f08506f1d45c577bc8423368fee6ed3cb04304 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 25 Jan 2007 17:38:26 +0000 Subject: [PATCH] Make llvm-extract preserve the callingconv of prototypes in the extracted code. llvm-svn: 33500 --- llvm/lib/Transforms/IPO/ExtractFunction.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/lib/Transforms/IPO/ExtractFunction.cpp b/llvm/lib/Transforms/IPO/ExtractFunction.cpp index 69d0926fb621..a871c4d7f2b4 100644 --- a/llvm/lib/Transforms/IPO/ExtractFunction.cpp +++ b/llvm/lib/Transforms/IPO/ExtractFunction.cpp @@ -70,6 +70,7 @@ namespace { 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