diff options
author | Reid Kleckner <rnk@google.com> | 2017-04-19 17:28:52 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-04-19 17:28:52 +0000 |
commit | 9d16fa09c6827c5baffe2b2a470443f6c9cc560a (patch) | |
tree | 3e591471d0c6a3ca9707a372a4d5595aa0c2f32b /llvm/unittests/Transforms/Utils/Cloning.cpp | |
parent | ffcb4df2042d314651bdf1842c3b1f1dd24aef85 (diff) | |
download | bcm5719-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 'llvm/unittests/Transforms/Utils/Cloning.cpp')
-rw-r--r-- | llvm/unittests/Transforms/Utils/Cloning.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/unittests/Transforms/Utils/Cloning.cpp b/llvm/unittests/Transforms/Utils/Cloning.cpp index 403c9c06c18..2f4ee863653 100644 --- a/llvm/unittests/Transforms/Utils/Cloning.cpp +++ b/llvm/unittests/Transforms/Utils/Cloning.cpp @@ -162,10 +162,8 @@ TEST_F(CloneInstruction, Attributes) { Function *F2 = Function::Create(FT1, Function::ExternalLinkage); - Attribute::AttrKind AK[] = { Attribute::NoCapture }; - AttributeList AS = AttributeList::get(context, 0, AK); Argument *A = &*F1->arg_begin(); - A->addAttr(AS); + A->addAttr(Attribute::NoCapture); SmallVector<ReturnInst*, 4> Returns; ValueToValueMapTy VMap; |