summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-04-19 17:28:52 +0000
committerReid Kleckner <rnk@google.com>2017-04-19 17:28:52 +0000
commit9d16fa09c6827c5baffe2b2a470443f6c9cc560a (patch)
tree3e591471d0c6a3ca9707a372a4d5595aa0c2f32b /clang/lib/CodeGen/CGObjC.cpp
parentffcb4df2042d314651bdf1842c3b1f1dd24aef85 (diff)
downloadbcm5719-llvm-9d16fa09c6827c5baffe2b2a470443f6c9cc560a.tar.gz
bcm5719-llvm-9d16fa09c6827c5baffe2b2a470443f6c9cc560a.zip
Prefer addAttr(Attribute::AttrKind) over the AttributeList overload
This should simplify the call sites, which typically want to tweak one attribute at a time. It should also avoid creating ephemeral AttributeLists that live forever. llvm-svn: 300718
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 357d1ab818c..76e7df861f7 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -1850,12 +1850,8 @@ static llvm::Constant *createARCRuntimeFunction(CodeGenModule &CGM,
F->addFnAttr(llvm::Attribute::NonLazyBind);
}
- if (IsForwarding(Name)) {
- llvm::AttrBuilder B;
- B.addAttribute(llvm::Attribute::Returned);
-
- F->arg_begin()->addAttr(llvm::AttributeList::get(F->getContext(), 1, B));
- }
+ if (IsForwarding(Name))
+ F->arg_begin()->addAttr(llvm::Attribute::Returned);
}
return RTF;
OpenPOWER on IntegriCloud