summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-04-28 21:48:28 +0000
committerReid Kleckner <rnk@google.com>2017-04-28 21:48:28 +0000
commit608c8b63b3945f4a17eadb6dd0a973b1b049bfe2 (patch)
tree3e946806c348fd1196aa35871e7abfaf5e8712b9 /llvm/lib/IR/Function.cpp
parente8dea1bc562fc949f1d9318c4b38f3a7e79ba27f (diff)
downloadbcm5719-llvm-608c8b63b3945f4a17eadb6dd0a973b1b049bfe2.tar.gz
bcm5719-llvm-608c8b63b3945f4a17eadb6dd0a973b1b049bfe2.zip
[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
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp4
1 files changed, 2 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud