1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
NAKAMURA Takumi
c1197d9021 Whitespace.
llvm-svn: 244431
2015-08-10 04:22:09 +00:00
NAKAMURA Takumi
b93b06ef3e Reformat linebreaks.
llvm-svn: 244430
2015-08-10 04:21:43 +00:00
Alexander Kornienko
f993659b8f Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.

llvm-svn: 240390
2015-06-23 09:49:53 +00:00
Alexander Kornienko
40cb19d802 Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
  -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
  llvm/lib/


Thanks to Eugene Kosov for the original patch!

llvm-svn: 240137
2015-06-19 15:57:42 +00:00
Benjamin Kramer
a1a4ea6fcb Make the DenseMap bucket type configurable and use a smaller bucket for DenseSet.
DenseSet used to be implemented as DenseMap<Key, char>, which usually doubled
the memory footprint of the map. Now we use a compressed set so the second
element uses no memory at all. This required some surgery on DenseMap as
all accesses to the bucket now have to go through methods; this should
have no impact on the behavior of DenseMap though. The new default bucket
type for DenseMap is a slightly extended std::pair as we expose it through
DenseMap's iterator and don't want to break any existing users.

llvm-svn: 223588
2014-12-06 19:22:44 +00:00
NAKAMURA Takumi
a1ef3346aa Prune CRLF.
llvm-svn: 220678
2014-10-27 12:37:26 +00:00
Lang Hames
9793d69437 [ADT] Add a 'find_as' operation to DenseSet.
This operation is analogous to its counterpart in DenseMap: It allows lookup
via cheap-to-construct keys (provided that getHashValue and isEqual are
implemented for the cheap key-type in the DenseMapInfo specialization).

Thanks to Chandler for the review.

llvm-svn: 220168
2014-10-19 19:36:33 +00:00
Yaron Keren
333ef0d2b6 Reverting size_type for the containers from size_type to unsigned.
Various places in LLVM assume that container size and count are unsigned
and do not use the container size_type. Therefore they break compilation
(or possibly executation) for LP64 systems where size_t is 64 bit while
unsigned is still 32 bit.

If we'll ever that many items in the container size_type could be made
size_t for a specific containers after reviweing its other uses.

llvm-svn: 211353
2014-06-20 12:20:56 +00:00
Yaron Keren
e1172cbc66 The count() function for STL datatypes returns unsigned, even where it's
only 1/0 result like std::set. Some of the LLVM ADT already return unsigned
count(), while others still return bool count().

In continuation to r197879, this patch modifies DenseMap, DenseSet, 
ScopedHashTable, ValueMap:: count() to return size_type instead of bool,
1 instead of true and 0 instead of false.

size_type is typedef-ed locally within each class to size_t.

http://reviews.llvm.org/D4018

Reviewed by dblaikie.

llvm-svn: 211350
2014-06-20 10:26:56 +00:00
Benjamin Kramer
bc12398f49 Remove unnecessary copy ctors.
They didn't provide any value over the default ones but blocked move semantics.

llvm-svn: 202664
2014-03-02 21:24:52 +00:00
Matt Arsenault
c72dd5807f Add missing definitions of key_type and value_type to DenseSet.
This matches std::set and allows using DenseSet with the functions
in SetOperations.h

llvm-svn: 198793
2014-01-08 21:38:04 +00:00
Eric Christopher
085e845222 Make comment a bit more clear.
llvm-svn: 171473
2013-01-04 17:59:17 +00:00
Argyrios Kyrtzidis
1d0503b1ef Add a getMemorySize() function for DenseSet.
llvm-svn: 169163
2012-12-03 21:46:21 +00:00
Benjamin Kramer
6ab8d85f64 Initialize DenseSets lazily.
llvm-svn: 135717
2011-07-21 23:03:59 +00:00
Nick Lewycky
8258d2da8c Add DenseSet::resize for API parity with DenseMap::resize.
llvm-svn: 124370
2011-01-27 09:10:42 +00:00
Dan Gohman
ace824be4a Make the iterator form of erase return void, since it always succeeds,
and since this is what std::map and std::set do.

llvm-svn: 112701
2010-09-01 14:00:35 +00:00
Owen Anderson
fd7fc038ac Fill out the interface of DenseSet a bit.
llvm-svn: 109562
2010-07-27 23:55:47 +00:00
Andrew Lenharth
4f4af9d95c Iterator traits and swap. closes PR6548 and PR6549
llvm-svn: 97974
2010-03-08 20:45:52 +00:00
Dan Gohman
612cbcdc1a Make DenseSet's erase pass on the return value rather than swallowing it.
llvm-svn: 95127
2010-02-02 21:11:22 +00:00
Daniel Dunbar
b7c5aa749a Remove unneeded ';' and a class/struct mismatch (noticed by clang).
llvm-svn: 90934
2009-12-09 02:58:09 +00:00
Chris Lattner
c9a91632e1 remove extraneous comma clang warns about
llvm-svn: 90707
2009-12-06 16:58:41 +00:00
Chris Lattner
d052c5bb9b Add range insert method for DenseSet and define DenseMapInfo for chars.
Patch by Kevin Fan!

llvm-svn: 68239
2009-04-01 19:50:49 +00:00
Misha Brukman
da77da48f3 Removed trailing whitespace.
llvm-svn: 62000
2009-01-09 19:25:42 +00:00
Dan Gohman
c97817aac3 Make DenseMap's insert return a pair, to more closely resemble std::map.
llvm-svn: 53177
2008-07-07 17:46:23 +00:00
Owen Anderson
dd29406f31 Have DenseSet::insert return a bool indicating whether the insertion succeeded or not.
llvm-svn: 53033
2008-07-02 17:29:59 +00:00
Ted Kremenek
247bdc8ec7 Implement != for DenseSet iterators.
llvm-svn: 50236
2008-04-24 23:49:45 +00:00
Ted Kremenek
100956926c Added iterator support for DenseSet.
llvm-svn: 50235
2008-04-24 23:48:12 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner
c604dd270a Mark count method const.
llvm-svn: 42639
2007-10-05 17:40:38 +00:00
Chris Lattner
1654385fd0 Add a new DenseSet abstraction.
llvm-svn: 42474
2007-09-30 00:47:20 +00:00