From 211b1f324fec79eddecccc4cb43a284bd3324cd5 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 10 Apr 2017 20:34:19 +0000 Subject: Revert "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies" This reverts r299875. A Linux bot came back with a test failure: http://bb.pgr.jp/builders/test-clang-i686-linux-RA/builds/741/steps/test_clang/logs/Clang%20%3A%3A%20CodeGen__2006-05-19-SingleEltReturn.c llvm-svn: 299878 --- llvm/lib/Transforms/Utils/CodeExtractor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/CodeExtractor.cpp') diff --git a/llvm/lib/Transforms/Utils/CodeExtractor.cpp b/llvm/lib/Transforms/Utils/CodeExtractor.cpp index 3bc33d0c6667..755427cace2e 100644 --- a/llvm/lib/Transforms/Utils/CodeExtractor.cpp +++ b/llvm/lib/Transforms/Utils/CodeExtractor.cpp @@ -362,7 +362,8 @@ Function *CodeExtractor::constructFunction(const ValueSet &inputs, // "target-features" attribute allowing it to be lowered. // FIXME: This should be changed to check to see if a specific // attribute can not be inherited. - AttrBuilder AB(oldFunction->getAttributes().getFnAttributes()); + AttributeList OldFnAttrs = oldFunction->getAttributes().getFnAttributes(); + AttrBuilder AB(OldFnAttrs, AttributeList::FunctionIndex); for (const auto &Attr : AB.td_attrs()) newFunction->addFnAttr(Attr.first, Attr.second); -- cgit v1.2.3