summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/AttributesTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix assertion when merging multiple empty AttributeListsReid Kleckner2017-05-311-0/+7
| | | | | | | | Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D33627 llvm-svn: 304300
* Fix off-by-one bug in AttributeList::addAttributes index handlingReid Kleckner2017-05-191-0/+19
| | | | | | | | | | getParamAlignment expects an argument number, not an AttributeList index. Johan Englan, who works on LDC, found this bug and told me about it off list. llvm-svn: 303458
* Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of ↵Reid Kleckner2017-05-021-1/+1
| | | | | | | | | | AttributeList" This time, I fixed, built, and tested clang. This reverts r301712. llvm-svn: 301981
* Revert r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of ↵Hans Wennborg2017-04-281-1/+1
| | | | | | | | | | | | | | | | | | AttributeList" This broke the Clang build. (Clang-side patch missing?) Original commit message: > [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: 301712
* [IR] Make add/remove Attributes use AttrBuilder instead of AttributeListReid Kleckner2017-04-281-1/+1
| | | | | | | | | This change cleans up call sites and avoids creating temporary AttributeList objects. NFC llvm-svn: 301697
* Remove buggy 'addAttributes(unsigned, AttrBuilder)' overloadReid Kleckner2017-04-191-0/+5
| | | | | | | | | | 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
* Fix crash in AttributeList::addAttributes, add testReid Kleckner2017-04-181-0/+9
| | | | llvm-svn: 300614
* Rename AttributeSet to AttributeListReid Kleckner2017-03-211-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This class is a list of AttributeSetNodes corresponding the function prototype of a call or function declaration. This class used to be called ParamAttrListPtr, then AttrListPtr, then AttributeSet. It is typically accessed by parameter and return value index, so "AttributeList" seems like a more intuitive name. Rename AttributeSetImpl to AttributeListImpl to follow suit. It's useful to rename this class so that we can rename AttributeSetNode to AttributeSet later. AttributeSet is the set of attributes that apply to a single function, argument, or return value. Reviewers: sanjoy, javed.absar, chandlerc, pete Reviewed By: pete Subscribers: pete, jholewinski, arsenm, dschuff, mehdi_amini, jfb, nhaehnle, sbc100, void, llvm-commits Differential Revision: https://reviews.llvm.org/D31102 llvm-svn: 298393
* Fix non-determinism in order of LLVM attributesReid Kleckner2016-04-041-0/+9
| | | | | | | | | | | | | | | | | | We were using array_pod_sort on an array of type 'Attribute', which wraps a pointer to AttributeImpl. For the most part this didn't matter because the printing code prints enum attributes in a defined order, but integer attributes such as 'align' and 'dereferenceable' were not ordered. Furthermore, AttributeImpl::operator< was broken for integer attributes. An integer attribute is a kind and an integer value, and both pieces need to be compared. By fixing the comparison operator, we can go back to std::sort, and things look good now. This should fix clang arm-swiftcall.c test failures on Windows. llvm-svn: 265361
* Make one of the AttributeSet ctors maintain the invariant that thePeter Collingbourne2013-08-021-0/+13
| | | | | | | | attribute list is ordered by index. Differential Revision: http://llvm-reviews.chandlerc.com/D1265 llvm-svn: 187682
* Fix test to not use the AttributeSet's AttributeWithIndex creation method.Bill Wendling2013-01-271-5/+5
| | | | llvm-svn: 173608
* Add a unit test to verifies that attribute uniquing works so it doesn't ↵Benjamin Kramer2013-01-121-0/+34
break again. The folding set details can be subtle and broke twice in the last couple of weeks. llvm-svn: 172313
OpenPOWER on IntegriCloud