From dc024674ff96820d6020757b48d47f46d4c07db2 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 27 Nov 2007 13:23:08 +0000 Subject: Fix PR1146: parameter attributes are longer part of the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/ExtractFunction.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Transforms/IPO/ExtractFunction.cpp') diff --git a/lib/Transforms/IPO/ExtractFunction.cpp b/lib/Transforms/IPO/ExtractFunction.cpp index ed22465f89..e5b2d41d52 100644 --- a/lib/Transforms/IPO/ExtractFunction.cpp +++ b/lib/Transforms/IPO/ExtractFunction.cpp @@ -95,6 +95,7 @@ namespace { Function *New = new Function(I->getFunctionType(), GlobalValue::ExternalLinkage); New->setCallingConv(I->getCallingConv()); + New->setParamAttrs(I->getParamAttrs()); // If it's not the named function, delete the body of the function I->dropAllReferences(); -- cgit v1.2.3