1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

27 Commits

Author SHA1 Message Date
NAKAMURA Takumi
b93b06ef3e Reformat linebreaks.
llvm-svn: 244430
2015-08-10 04:21:43 +00:00
Richard Smith
be9e5bef40 SetVector: add reverse_iterator support.
llvm-svn: 242865
2015-07-22 01:30:58 +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
David Blaikie
60e6c80905 Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard
library's associative container insert function.

This lead to updating SmallSet::insert to return pair<iterator, bool>,
and then to update SmallPtrSet::insert to return pair<iterator, bool>,
and then to update all the existing users of those functions...

llvm-svn: 222334
2014-11-19 07:49:26 +00:00
Chandler Carruth
dfdccab32b [C++11] Remove the completely unnecessary requirement on SetVector's
remove_if that its predicate is adaptable. We don't actually need this,
we can write a generic adapter for any predicate.

This lets us remove some very wrong std::function usages. We should
never be using std::function for predicates to algorithms. This incurs
an *indirect* call overhead for every evaluation of the predicate, and
makes it very hard to inline through.

llvm-svn: 202742
2014-03-03 19:28:52 +00:00
Jakub Staszak
ef4f3f31d3 Make sure that pop_back_val() result is used.
llvm-svn: 188717
2013-08-19 22:12:00 +00:00
Chandler Carruth
e189a098e8 Third try at fixing this. ;] Go back to using std::remove_if, which has
most of the behavior we want, but wrap the predicate in one which erases
elements from the set if they pass the predicate. Oh what I wouldn't
give for a lambda here.

Let me know if the predicate wrapping is too much magic. ;]

llvm-svn: 165076
2012-10-03 01:04:07 +00:00
Chandler Carruth
f28a5b80a4 Switch the SetVector::remove_if implementation to use partition which
preserves the values of the relocated entries, unlikely remove_if. This
allows walking them and erasing them.

Also flesh out the predicate we are using for this to support the
various constraints actually imposed on a UnaryPredicate -- without this
we can't compose it with std::not1.

Thanks to Sean Silva for the review here and noticing the issue with
std::remove_if.

llvm-svn: 165073
2012-10-03 00:03:00 +00:00
Chandler Carruth
72359007f5 Teach the new SROA to handle cases where an alloca that has already been
scheduled for processing on the worklist eventually gets deleted while
we are processing another alloca, fixing the original test case in
PR13990.

To facilitate this, add a remove_if helper to the SetVector abstraction.
It's not easy to use the standard abstractions for this because of the
specifics of SetVectors types and implementation.

Finally, a nice small test case is included. Thanks to Benjamin for the
fantastic reduced test case here! All I had to do was delete some empty
basic blocks!

llvm-svn: 165065
2012-10-02 22:46:45 +00:00
Chandler Carruth
04822c8467 Clean up these doxygen comments to follow the proposed new style. This
also makes it more consistent with Clang and several passes' doxygen
style.

llvm-svn: 165064
2012-10-02 22:46:40 +00:00
Sylvestre Ledru
b77340e506 Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
llvm-svn: 164768
2012-09-27 10:14:43 +00:00
Sylvestre Ledru
1c5e7904de Fix a typo 'iff' => 'if'
llvm-svn: 164767
2012-09-27 09:59:43 +00:00
Chris Lattner
151b0ec955 add a method to improve compatibility with SmallVector.
llvm-svn: 146928
2011-12-20 00:03:41 +00:00
Dan Gohman
d299070514 Make SetVector's remove indicate whether it actually removed something.
llvm-svn: 114612
2010-09-22 23:20:04 +00:00
Dan Gohman
e1853a7473 Implement operator== and operator!= for SetVector.
llvm-svn: 105508
2010-06-05 00:26:02 +00:00
Misha Brukman
380e3db1b4 Fixed lint errors:
* Alphabetized #includes
* Removed trailing whitespace
* Wrapped or shortened lines over 80 chars

llvm-svn: 65181
2009-02-20 22:20:18 +00:00
Misha Brukman
da77da48f3 Removed trailing whitespace.
llvm-svn: 62000
2009-01-09 19:25:42 +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
1113f4c8ee Make SmallSetVector useful
llvm-svn: 33854
2007-02-04 00:30:40 +00:00
Chris Lattner
cfdda5e521 Convert SetVector to be a true adapter class and add SmallSetVector.
llvm-svn: 33846
2007-02-03 23:56:03 +00:00
Reid Spencer
f1f0b585a8 For PR1094:
Make the SetVector::iterator be the vector's const_iterator.

llvm-svn: 33279
2007-01-17 02:22:18 +00:00
Misha Brukman
3f0aa3dbf8 Remove trailing whitespace
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Chris Lattner
ae45589b0f Use explicit std:: qualification to avoid relying on Koenig lookup, which
VC++ does not do properly.  Thanks to Morten Ofstad for the patch!

llvm-svn: 16955
2004-10-13 15:11:23 +00:00
Reid Spencer
c362a7299b Fix the replace method to assert if an item was erased from the set but not
found in the vector. Previously, it just ignored this condition.

llvm-svn: 16296
2004-09-11 20:38:25 +00:00
Reid Spencer
605f05bd5a Implement the remove method for deleting entries from the SetVector.
llvm-svn: 16283
2004-09-11 04:25:58 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00