aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
Commit message (Collapse)AuthorAgeFilesLines
* Introduce helpers to compute the 32-bit varaints and 64-bit variants ofChandler Carruth2012-02-061-0/+20
| | | | | | | some architectures. These are useful for interacting with multiarch or bi-arch GCC (or GCC-based) toolchains. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149895 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallVector's construct_range is the same thing as std::uninitialized_fill, ↵Benjamin Kramer2012-02-051-9/+3
| | | | | | no need to reinvent it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149851 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code. No functionality change.Benjamin Kramer2012-02-051-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149850 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-056-35/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin fleshing out more convenience predicates in llvm::Triple andChandler Carruth2012-02-051-14/+34
| | | | | | | | | | convert at least one client over to use them. Subsequent patches both to LLVM and Clang will try to convert more people over to a common set of predicates. This round of predicates is focused on OS-categorization predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149815 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Triple::getMacOSXVersion to replace crufty code in the clang driver.Bob Wilson2012-01-311-0/+7
| | | | | | | This new function provides a way to get the Mac OS X version number from either generic "darwin" triples of macosx triples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149438 91177308-0d34-0410-b5e6-96231b3b80d8
* RefCountedBaseVPTR needs the IntrusiveRefCntPtrInfo as friend,Manuel Klimek2012-01-311-1/+1
| | | | | | | | | | | | | | now that this handles the release / retain calls. Adds a regression test for that bug (which is a compile-time regression) and for the last two changes to the IntrusiveRefCntPtr, especially tests for the memory leak due to copy construction of the ref-counted object and ensuring that the traits are used for release / retain calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149411 91177308-0d34-0410-b5e6-96231b3b80d8
* Add various coarse bit-width architecture predicates to llvm::Triple.Chandler Carruth2012-01-311-0/+19
| | | | | | | These are very useful for frontends and other utilities reasoning about or selecting between triples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149353 91177308-0d34-0410-b5e6-96231b3b80d8
* Relax constructor for IntrusiveRefCntPtr to not be explicit.Ted Kremenek2012-01-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149309 91177308-0d34-0410-b5e6-96231b3b80d8
* Use traits for IntrusiveRefCntPtr to determine how to increment/decrement a ↵Ted Kremenek2012-01-311-2/+8
| | | | | | reference count. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149308 91177308-0d34-0410-b5e6-96231b3b80d8
* DenseMap::find_as() and unit tests.Talin2012-01-301-2/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149229 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup the organization of some methods in llvm::Triple and provideChandler Carruth2012-01-291-15/+19
| | | | | | a better doxyment group for convenience predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149211 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a BitVector::reset(BitVector&) method.Jakob Stoklund Olesen2012-01-291-0/+10
| | | | | | | The alternative LHS &= ~RHS is way too slow because it creates a temporary that calls malloc/free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149187 91177308-0d34-0410-b5e6-96231b3b80d8
* Add r149110 back with a fix for when the vector and the int have the sameRafael Espindola2012-01-271-0/+10
| | | | | | width. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149151 91177308-0d34-0410-b5e6-96231b3b80d8
* Additional methods for SmallString.Talin2012-01-241-5/+228
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148881 91177308-0d34-0410-b5e6-96231b3b80d8
* add ::drop_back() and ::drop_front() methods, which are like ↵Chris Lattner2012-01-241-0/+14
| | | | | | pop_front/pop_back on a vector, but a) aren't destructive to "this", and b) can take a # elements to drop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148791 91177308-0d34-0410-b5e6-96231b3b80d8
* Various public StringMap methods take or return "MapEntryTy", make it public.Chris Lattner2012-01-231-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148732 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r148688 too, this isn't safe for DenseMap use. When DenseMap ↵Chris Lattner2012-01-231-5/+2
| | | | | | resizes, it will need to copy around arbitrary pointers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148699 91177308-0d34-0410-b5e6-96231b3b80d8
* allow OwningPtr to be copy constructed if null, which is required toChris Lattner2012-01-231-2/+5
| | | | | | | make them be a valuetype in a DenseMap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148688 91177308-0d34-0410-b5e6-96231b3b80d8
* Protect SmallVectorImpl's constructor and a few other methods that aren't ↵Benjamin Kramer2012-01-201-4/+6
| | | | | | meant to be public. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148550 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new MutableArrayRef class, which refers to a series of mutableChris Lattner2012-01-191-1/+83
| | | | | | | T's that are consequtively in memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148463 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the gnueabihf environment. Patch by Sylvestre Ledru.Rafael Espindola2012-01-181-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148434 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing spaces.Jakub Staszak2012-01-171-22/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148332 91177308-0d34-0410-b5e6-96231b3b80d8
* add some missing const qualifiers.Chris Lattner2012-01-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148274 91177308-0d34-0410-b5e6-96231b3b80d8
* Add portable bit mask operations to BitVector.Jakob Stoklund Olesen2012-01-171-0/+63
| | | | | | | | | | | | BitVector uses the native word size for its internal representation. That doesn't work well for literal bit masks in source code. This patch adds BitVector operations to efficiently apply literal bit masks specified as arrays of uint32_t. Since each array entry always holds exactly 32 bits, these portable bit masks can be source code literals, probably produced by TableGen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148272 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the triple library about the androideabi environment.Chandler Carruth2012-01-101-1/+2
| | | | | | Patch by Evgeniy Stepanov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147871 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove VectorExtras. This unused helper was written for a type of API that ↵Benjamin Kramer2012-01-071-41/+0
| | | | | | is discouraged now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147738 91177308-0d34-0410-b5e6-96231b3b80d8
* Port the trick to skip the check for empty buckets from StringMap to DenseMap.Benjamin Kramer2012-01-071-9/+9
| | | | | | This should fix the odd behavior that find() is slower than lookup(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147731 91177308-0d34-0410-b5e6-96231b3b80d8
* allow clients of SmallSet to specify their own comparison function for the set.Chris Lattner2012-01-051-2/+2
| | | | | | | Patch by Stepan Dyatkovskiy! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147607 91177308-0d34-0410-b5e6-96231b3b80d8
* StringMap.find never points to an empty bucket or tombstone, skip the check.Benjamin Kramer2012-01-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147546 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch StringMap from an array of structures to a structure of arrays.Benjamin Kramer2011-12-271-34/+26
| | | | | | | - -25% memory usage of the main table on x86_64 (was wasted in struct padding). - no significant performance change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147294 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed typo.Lang Hames2011-12-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147113 91177308-0d34-0410-b5e6-96231b3b80d8
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+1
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146960 91177308-0d34-0410-b5e6-96231b3b80d8
* add a method to improve compatibility with SmallVector.Chris Lattner2011-12-201-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146928 91177308-0d34-0410-b5e6-96231b3b80d8
* As Doug pointed out (and I really should know), it is perfectly easy toChandler Carruth2011-12-171-16/+4
| | | | | | | | | make VariadicFunction actually be trivial. Do so, and also make it look more like your standard trivial functor by making it a struct with no access specifiers. The unit test is updated to initialize its functors properly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146827 91177308-0d34-0410-b5e6-96231b3b80d8
* Make GCC happy by using makeAraryRef instead of the implicit conversion.Chandler Carruth2011-12-161-4/+4
| | | | | | | I have no idea why GCC can't cope with the implicit conversion and Clang can, or whose bug it is. Grr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146732 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a generic collection of class templates to ADT for buildingChandler Carruth2011-12-161-0/+343
| | | | | | | | | | | | variadic-like functions in C++98. See the comments in the header file for a more detailed description of how these work. We plan to use these extensively in the AST matching library. This code and idea were originally authored by Zhanyong Wan. I've condensed it using macros to reduce repeatition and adjusted it to fit better with LLVM's ADT. Thanks to both David Blaikie and Doug Gregor for the review! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146729 91177308-0d34-0410-b5e6-96231b3b80d8
* Hexagon backend supportTony Linthicum2011-12-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146412 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement recursive_directory_iterator and makeMichael J. Spencer2011-12-081-1/+6
| | | | | | directory_iterator preserve InputIterator semantics on copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146200 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding missing anchor to DATDeltaAlgorithm.David Blaikie2011-12-071-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146025 91177308-0d34-0410-b5e6-96231b3b80d8
* allow TinyPtrVector to implicitly convert to ArrayRef.Chris Lattner2011-12-061-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145898 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence tsan false-positives (tsan can't track things which are only safe due toNick Lewycky2011-12-051-0/+2
| | | | | | | | memory fences) in statistics registration, which works the same way that ManagedStatic registration does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145869 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the Dominators recalculate() function to only rely on GraphTraitsAnna Zaks2011-12-051-1/+4
| | | | | | | | | | | This is a patch by Guoping Long! As part of utilizing LLVM Dominator computation in Clang, made two changes to LLVM dominators tree implementation: - (1) Change the recalculate() template function to only rely on GraphTraits. - (2) Add a size() method to GraphTraits template class to query the number of nodes in the graph. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145837 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle more cases in APInt::getLowBitsSet's fast path.Benjamin Kramer2011-11-281-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145249 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in RefCountedBase/RefCountedBaseVPTR where the reference count was ↵Ted Kremenek2011-11-171-0/+3
| | | | | | accidentally copied as part of the copy constructor. This could result in objects getting leaked because there reference count was too high. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144931 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace (Lower|Upper)caseString in favor of StringRef's newest methods.Benjamin Kramer2011-11-061-16/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143891 91177308-0d34-0410-b5e6-96231b3b80d8
* ADT/StringRef: Add ::lower() and ::upper() methods.Daniel Dunbar2011-11-061-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143880 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the Alpha backend.Dan Gohman2011-10-271-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143164 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the Blackfin backend.Dan Gohman2011-10-251-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142880 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the SystemZ backend.Dan Gohman2011-10-241-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142878 91177308-0d34-0410-b5e6-96231b3b80d8