From 608c8b63b3945f4a17eadb6dd0a973b1b049bfe2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Apr 2017 21:48:28 +0000 Subject: [IR] Make add/remove Attributes use AttrBuilder instead of AttributeList This change cleans up call sites and avoids creating temporary AttributeList objects. NFC llvm-svn: 301697 --- llvm/lib/IR/Function.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/IR/Function.cpp') diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index fc61ba7439b..7b0838c41ab 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -328,7 +328,7 @@ void Function::addAttribute(unsigned i, Attribute Attr) { setAttributes(PAL); } -void Function::addAttributes(unsigned i, AttributeList Attrs) { +void Function::addAttributes(unsigned i, const AttrBuilder &Attrs) { AttributeList PAL = getAttributes(); PAL = PAL.addAttributes(getContext(), i, Attrs); setAttributes(PAL); @@ -346,7 +346,7 @@ void Function::removeAttribute(unsigned i, StringRef Kind) { setAttributes(PAL); } -void Function::removeAttributes(unsigned i, AttributeList Attrs) { +void Function::removeAttributes(unsigned i, const AttrBuilder &Attrs) { AttributeList PAL = getAttributes(); PAL = PAL.removeAttributes(getContext(), i, Attrs); setAttributes(PAL); -- cgit v1.2.3