diff options
author | Reid Kleckner <rnk@google.com> | 2017-04-19 01:51:13 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-04-19 01:51:13 +0000 |
commit | 6190625381bd6c47765ecdc922466700f5ece5a6 (patch) | |
tree | cb72f74224d252d2b17fee0c9b36fa9fd9028cc2 /llvm/unittests/IR/AttributesTest.cpp | |
parent | 5aacc4021bf3d689cbfd8921666b098441746054 (diff) | |
download | bcm5719-llvm-6190625381bd6c47765ecdc922466700f5ece5a6.tar.gz bcm5719-llvm-6190625381bd6c47765ecdc922466700f5ece5a6.zip |
Remove buggy 'addAttributes(unsigned, AttrBuilder)' overload
The 'addAttributes(unsigned, AttrBuilder)' overload delegated to 'get'
instead of 'addAttributes'.
Since we can implicitly construct an AttrBuilder from an AttributeSet,
just standardize on AttrBuilder.
llvm-svn: 300651
Diffstat (limited to 'llvm/unittests/IR/AttributesTest.cpp')
-rw-r--r-- | llvm/unittests/IR/AttributesTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/unittests/IR/AttributesTest.cpp b/llvm/unittests/IR/AttributesTest.cpp index c9c8cb75ebf..7c3df2e19e8 100644 --- a/llvm/unittests/IR/AttributesTest.cpp +++ b/llvm/unittests/IR/AttributesTest.cpp @@ -56,6 +56,11 @@ TEST(Attributes, AddAttributes) { B.addAttribute(Attribute::NoReturn); AL = AL.addAttributes(C, AttributeList::FunctionIndex, AttributeSet::get(C, B)); EXPECT_TRUE(AL.hasFnAttribute(Attribute::NoReturn)); + B.clear(); + B.addAttribute(Attribute::SExt); + AL = AL.addAttributes(C, AttributeList::ReturnIndex, B); + EXPECT_TRUE(AL.hasAttribute(AttributeList::ReturnIndex, Attribute::SExt)); + EXPECT_TRUE(AL.hasFnAttribute(Attribute::NoReturn)); } } // end anonymous namespace |