Michael J. Spencer
e369cc8053
Support/PathV2: Implement directory iteration on POSIX.
...
llvm-svn: 122879
2011-01-05 16:38:57 +00:00
Michael J. Spencer
b5b192853b
UnitTests/Path: Produce useful diagnostics on error.
...
llvm-svn: 122812
2011-01-04 17:00:18 +00:00
Chris Lattner
2f774c1246
fix PR8867: a crash handling fp128. Thanks to Nick for the testcase.
...
llvm-svn: 122613
2010-12-29 01:33:36 +00:00
Jeffrey Yasskin
a199652a3e
Change all self assignments X=X to (void)X, so that we can turn on a
...
new gcc warning that complains on self-assignments and
self-initializations.
llvm-svn: 122458
2010-12-23 00:58:24 +00:00
Jakob Stoklund Olesen
26b4e8ec0a
Add ADT/IntEqClasses.h as a light-weight implementation of EquivalenceClasses.h.
...
This implementation already exists as ConnectedVNInfoEqClasses in
LiveInterval.cpp, and it seems to be generally useful to have a light-weight way
of forming equivalence classes of small integers.
IntEqClasses doesn't allow enumeration of the elements in a class.
llvm-svn: 122293
2010-12-21 00:04:46 +00:00
Jakob Stoklund Olesen
64c013d79d
Add more checks to IntervalMapOverlaps::advance() to ensure that advanceTo sees
...
monotonic keys.
llvm-svn: 122093
2010-12-17 22:07:54 +00:00
Jakob Stoklund Olesen
f17722908c
It is allowed to call IntervalMap::const_iterator::advanceTo() with a key that
...
moves the iterator to end(), and it is valid to call it on end().
That means it is valid to call advanceTo() with any monotonic key sequence.
llvm-svn: 122092
2010-12-17 22:07:51 +00:00
Jakob Stoklund Olesen
aec6ae67a1
Fix crash when IntervalMapOverlaps::advanceTo moves past the last overlap.
...
llvm-svn: 122081
2010-12-17 19:18:38 +00:00
Jakob Stoklund Olesen
c63484e962
Complete tests for IntervalMapOverlaps.
...
llvm-svn: 122019
2010-12-17 01:31:49 +00:00
Jakob Stoklund Olesen
9681be67c5
Add basic test exposing many bugs.
...
llvm-svn: 121995
2010-12-16 19:46:09 +00:00
Michael J. Spencer
7979bb402f
Support/PathV2: Change most functions in the path namespace to return their work
...
via their return value instead of an out parameter.
llvm-svn: 121149
2010-12-07 17:04:04 +00:00
Frits van Bommel
78efe72880
CMake: Fix warning in gtest header used by unit tests.
...
llvm-svn: 121127
2010-12-07 10:22:07 +00:00
Jay Foad
79e18ed269
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
...
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
llvm-svn: 121120
2010-12-07 08:25:19 +00:00
NAKAMURA Takumi
e9ad42c89e
unittests/CMakeLists.txt: Tweak unittests' layout to be identical to GNU build.
...
llvm-svn: 121117
2010-12-07 07:41:23 +00:00
Michael J. Spencer
a96fe51fa6
Support/PathV2: Remove the error_code return type from all functions in the path
...
namespace. None of them return anything except for success anyway. These will be
converted to returning their result soon.
llvm-svn: 121109
2010-12-07 03:57:37 +00:00
Michael J. Spencer
7c3efd63d4
Support/PathV2: Move make_absolute from path to fs.
...
llvm-svn: 121108
2010-12-07 03:57:17 +00:00
Michael J. Spencer
244b426701
Support/FileSystem: Add directory_iterator implementation.
...
llvm-svn: 120989
2010-12-06 04:28:42 +00:00
Michael J. Spencer
e541b5fa8c
Unittests/Support/PathV2: Add FileSystem tests.
...
llvm-svn: 120888
2010-12-04 03:18:42 +00:00
Jakob Stoklund Olesen
4cd667151d
Add IntervalMap::iterator::set{Start,Stop,Value} methods that allow limited
...
editing of the current interval.
These methods may cause coalescing, there are corresponding set*Unchecked
methods for editing without coalescing. The non-coalescing methods are useful
for applying monotonic transforms to all keys or values in a map without
accidentally coalescing transformed and untransformed intervals.
llvm-svn: 120829
2010-12-03 19:02:00 +00:00
Michael J. Spencer
1d9a2b7541
Support/FileSystem: Add remove implementation.
...
llvm-svn: 120817
2010-12-03 17:53:43 +00:00
Benjamin Kramer
0ae5320f11
unittests/Support/PathV2: remove(3) requires a terminated string.
...
llvm-svn: 120803
2010-12-03 12:33:32 +00:00
Michael J. Spencer
1d892d362b
Unittests/Support/PathV2: Cleanup and remove output.
...
llvm-svn: 120785
2010-12-03 02:22:34 +00:00
Michael J. Spencer
1c7dd63ba8
unittests/Support/PathV2: Comment out test because some systems are saying that
...
a file exists when it shouldn't.
llvm-svn: 120784
2010-12-03 02:10:30 +00:00
Michael J. Spencer
4e1623c715
Support/FileSystem: Add unique_file and exists implementations.
...
llvm-svn: 120776
2010-12-03 01:21:28 +00:00
Michael J. Spencer
39b77a6a11
Make valgrind happy.
...
llvm-svn: 120616
2010-12-01 22:28:42 +00:00
Michael J. Spencer
03bbd0f21d
Support/ADT/Twine: Add toNullTerminatedStringRef.
...
llvm-svn: 120600
2010-12-01 20:37:30 +00:00
Michael J. Spencer
fe9094d522
unittests/Support/PathV2: Fix -pedantic warning.
...
llvm-svn: 120590
2010-12-01 19:23:49 +00:00
Jay Foad
789e8ac4f7
PR5207: Rename overloaded APInt methods set(), clear(), flip() to
...
setAllBits(), setBit(unsigned), etc.
llvm-svn: 120564
2010-12-01 08:53:58 +00:00
Michael J. Spencer
1796028f41
Support/PathV2: Add is_{absolute,relative} implementation.
...
llvm-svn: 120560
2010-12-01 06:21:53 +00:00
Michael J. Spencer
5aa4703418
Support/PathV2: Add has_{root_path,root_name,root_directory,parent_path,filename,stem,extension} implementation.
...
llvm-svn: 120559
2010-12-01 06:03:50 +00:00
Michael J. Spencer
8d7acc7159
unittests/Support/PathV2: Make tests much shorter; although harder to understand.
...
I'm going to replace this all anyway with a proper table and separated tests
when done.
llvm-svn: 120558
2010-12-01 06:03:33 +00:00
Michael J. Spencer
f6333e887f
Support/PathV2: Add extension implementation.
...
llvm-svn: 120550
2010-12-01 03:37:41 +00:00
Michael J. Spencer
14039e9883
Support/PathV2: Add stem implementation.
...
llvm-svn: 120547
2010-12-01 03:18:33 +00:00
Michael J. Spencer
c3aaf36678
Support/PathV2: Add filename implementation.
...
llvm-svn: 120546
2010-12-01 03:18:17 +00:00
Michael J. Spencer
4beee08409
Support/PathV2: Add native implementation.
...
llvm-svn: 120539
2010-12-01 02:48:27 +00:00
Michael J. Spencer
8d5c96c575
Support/PathV2: Add replace_extension implementation.
...
llvm-svn: 120514
2010-12-01 00:52:55 +00:00
Michael J. Spencer
5ac386d311
Support/PathV2: Add remove_filename implementation.
...
llvm-svn: 120513
2010-12-01 00:52:28 +00:00
Michael J. Spencer
a10e76dd58
Support/PathV2: Implement reverse iteration and parent_path.
...
llvm-svn: 120496
2010-11-30 23:28:07 +00:00
Michael J. Spencer
b285e634a8
Support/PathV2: Fix 80 col.
...
llvm-svn: 120349
2010-11-29 23:35:49 +00:00
Michael J. Spencer
88e48a78d5
unittests: Merge SystemTests back into SupportTests.
...
llvm-svn: 120330
2010-11-29 22:29:04 +00:00
Michael J. Spencer
8ac563a538
Support: Add PathV2 implementation.
...
llvm-svn: 120329
2010-11-29 22:28:51 +00:00
Michael J. Spencer
d5ec932c3a
Merge System into Support.
...
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Jakob Stoklund Olesen
36f332e23a
Disallow overlapping inserts, even when inserting the same value.
...
We always disallowed overlapping inserts with different values, and this makes
the insertion code smaller and faster.
If an overwriting insert is needed, it can be added as a separate method that
trims any existing intervals before inserting. The immediate use cases for
IntervalMap don't need this - they only use disjoint insertions.
llvm-svn: 120264
2010-11-28 22:17:11 +00:00
Jakob Stoklund Olesen
40f22dea6e
Add default constructors for iterators.
...
These iterators don't point anywhere, and they can't be compared to anything.
They are only good for assigning to.
llvm-svn: 120239
2010-11-28 07:21:48 +00:00
Jakob Stoklund Olesen
3ef9f7bc95
Implement const_iterator::advanceTo().
...
This is a version of find() that always searches forwards and is faster for
local searches.
llvm-svn: 120237
2010-11-28 07:00:46 +00:00
Jakob Stoklund Olesen
d23cc8a255
Add more tests for erase(). Fix a few exposed bugs.
...
llvm-svn: 120227
2010-11-27 22:56:53 +00:00
Jakob Stoklund Olesen
c6f16354b9
Add test case with randomly ordered insertions, massive coalescing.
...
Implement iterator::erase() in a simple version that erases nodes when they
become empty, but doesn't try to redistribute elements among siblings for better
packing.
Handle coalescing across leaf nodes which may require erasing entries.
llvm-svn: 120226
2010-11-27 21:12:36 +00:00
NAKAMURA Takumi
649a6c919c
unittests/JITTests: Don't use --export-dynamic but --export-all-symbols on cygming.
...
GNU ld/PECOFF accepts but ignores them below;
--version-script
--export-dynamic
--rpath
FIXME: autoconf should be aware of them.
llvm-svn: 120179
2010-11-26 09:32:02 +00:00
Jakob Stoklund Olesen
6e57d83076
Add B+-tree test case that creates a height 3 tree with a smaller root node.
...
Change temporary debugging code to write a dot file directly.
llvm-svn: 120171
2010-11-26 06:54:20 +00:00
Michael J. Spencer
35c7e4a3c0
google test depends on Support.
...
llvm-svn: 120105
2010-11-24 19:35:15 +00:00