summaryrefslogtreecommitdiff
path: root/unittests/Transforms/Utils
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
commitd6b4b10a3950d41cf4422c7fa4a6c5efccaf543a (patch)
treeaef835c8c801382d5fd3250ec1f5a76025d676bf /unittests/Transforms/Utils
parent8ccdc594587ff374c3726a30a4ce0c29033971e1 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Transforms/Utils')
-rw-r--r--unittests/Transforms/Utils/Cloning.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/unittests/Transforms/Utils/Cloning.cpp b/unittests/Transforms/Utils/Cloning.cpp
index 403c9c06c18..2f4ee863653 100644
--- a/unittests/Transforms/Utils/Cloning.cpp
+++ b/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;