Bill Wendling
71f808dfa2
* Don't explicitly cast "0" to "void*". This doesn't work well with specialized
...
StringMapEntryInitializer classes. Leave it for the compiler to figure out what
the type is and what "0" should be transformed into.
* Un-disable the unit tests which test the StringMapEntryInitializer class.
llvm-svn: 61922
2009-01-08 08:26:46 +00:00
Misha Brukman
83a92e0e1e
Remove extra blank line and space.
...
llvm-svn: 61916
2009-01-08 06:11:51 +00:00
Misha Brukman
4044287626
* Added unittests for StringMap
...
* Fixed but in StringMap::clear()
* Removed trailing whitespace
Original patch by Talin.
llvm-svn: 61914
2009-01-08 04:48:20 +00:00
Misha Brukman
c6d4c08346
* Fixed spelling of "sentinel"
...
* Removed trailing whitespace
llvm-svn: 61907
2009-01-08 02:21:23 +00:00
Dan Gohman
8271066844
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Dan Gohman
97be71789f
Add several more unimplemented operator overloads to ilist_iterator
...
to help catch errors.
llvm-svn: 61622
2009-01-04 03:22:42 +00:00
Nick Lewycky
35e441f7f1
Fix typo.
...
llvm-svn: 61554
2009-01-02 05:01:22 +00:00
Cedric Venet
b260c282bc
Add explicit this-> for some member function in templated base class.
...
These call are probably dependent but VS with /Za don't seems to think so. We need to help him.
llvm-svn: 60978
2008-12-13 10:55:13 +00:00
Dan Gohman
c0280e8867
Move the conversion to intptr_t to a separate statement. This
...
avoids GCC's warning even on 64-bit hosts.
llvm-svn: 60706
2008-12-08 17:41:24 +00:00
Ted Kremenek
164f7f4a43
Use 'delete []' instead of 'delete' in OwningArray::reset().
...
llvm-svn: 60703
2008-12-08 17:28:11 +00:00
Dan Gohman
42bd5cffc9
Use intptr_t instead of unsigned here, which is more appropriate
...
in a really obscure way, but more importantly has the side effect
of avoiding a GCC warning in the case that IntType is bool.
llvm-svn: 60677
2008-12-07 21:28:00 +00:00
Chris Lattner
5a1d7ab054
add a new pop_back_val method which returns the value popped. This is
...
heretical from a STL standpoint, but is oh-so-useful for things that
can't throw exceptions when copied, like, well, everything in LLVM.
llvm-svn: 60587
2008-12-05 07:11:05 +00:00
Chris Lattner
a249224590
Fix isIntN to work with APInts > 64 bits. This method is only
...
used by clang apparently.
llvm-svn: 60446
2008-12-02 23:33:29 +00:00
Chris Lattner
0cb74d3d8e
add densemap range insertion method.
...
llvm-svn: 60400
2008-12-02 06:08:04 +00:00
Chris Lattner
b86c76fdbb
reenable array_pod_sort, this time hopefully happy on 64-bit
...
and big endian systems.
llvm-svn: 60371
2008-12-01 21:11:25 +00:00
Chris Lattner
d6533f8d0a
don't #include <algorithm> into the llvm namespace.
...
llvm-svn: 60365
2008-12-01 19:45:45 +00:00
Chris Lattner
ddae8937e6
switch to std::sort until I have time to sort this out.
...
llvm-svn: 60354
2008-12-01 17:00:08 +00:00
Chris Lattner
ba0f3caaa7
define array_pod_sort in terms of operator< instead of my brain
...
damaged approximation. This should fix it on big endian platforms
and on 64-bit.
llvm-svn: 60352
2008-12-01 16:50:01 +00:00
Chris Lattner
3ac27eff64
don't assume iterators implicitly convert to pointers.
...
llvm-svn: 60336
2008-12-01 06:50:46 +00:00
Chris Lattner
80d0eff786
Introduce a new array_pod_sort function and switch LSR to use it
...
instead of std::sort. This shrinks the release-asserts LSR.o file
by 1100 bytes of code on my system.
We should start using array_pod_sort where possible.
llvm-svn: 60335
2008-12-01 06:49:59 +00:00
Eli Friedman
401743c904
Fix bogus assertion using getSExtValue for legitimate values, like -1 in
...
an 128-bit-wide integer. No testcase; the issue I ran into depends on
local changes.
llvm-svn: 60311
2008-12-01 00:43:48 +00:00
Chris Lattner
ee7fbed62d
add the rest of the comparison routines.
...
llvm-svn: 60303
2008-11-30 19:10:41 +00:00
Chris Lattner
8c592b282e
fix indentation. std::pair is "isPod" if the first/second are both isPod.
...
llvm-svn: 60262
2008-11-30 00:50:20 +00:00
Torok Edwin
7f54c665a2
protect against negative values that would exceed allowed bit width
...
llvm-svn: 60239
2008-11-29 08:52:45 +00:00
Chris Lattner
ce03bccd7e
apparently GCC doesn't believe that I understand C
...
precedence rules. Pacify it.
llvm-svn: 60237
2008-11-29 08:36:39 +00:00
Duncan Sands
845f6467ba
Typo fix.
...
llvm-svn: 60236
2008-11-29 08:03:35 +00:00
Chris Lattner
7ae87447ed
Fix sentinels to use correctly 'aligned' pointers.
...
llvm-svn: 60229
2008-11-29 01:36:16 +00:00
Chris Lattner
070df849e9
Fix spello, add DenseMapInfo specialization for PointerIntPair.
...
llvm-svn: 60228
2008-11-29 01:18:05 +00:00
Chris Lattner
b41c45dbdf
fix comment typo
...
llvm-svn: 60227
2008-11-28 23:57:26 +00:00
Chris Lattner
507e71fce3
fix a bug.
...
llvm-svn: 60225
2008-11-28 23:36:15 +00:00
Chris Lattner
d8b755ed95
add a generic "bitmangled pointer" class, which allows a parameterized
...
pointer and integer type to be used.
llvm-svn: 60224
2008-11-28 23:31:44 +00:00
Ted Kremenek
d0f8118dc1
Add typedef to StringMapEntry.
...
llvm-svn: 60134
2008-11-27 00:17:25 +00:00
Chris Lattner
527a103e8e
add an operator= to assign to smallstring.
...
llvm-svn: 59715
2008-11-20 07:09:17 +00:00
Zhongxing Xu
12b52895f2
move partial template specialization to FoldingSet.h.
...
llvm-svn: 59434
2008-11-17 02:40:00 +00:00
Zhongxing Xu
fb7e7e8158
Fix 80-col violation.
...
llvm-svn: 59394
2008-11-16 04:44:41 +00:00
Zhongxing Xu
cfe0df8609
Add partial specialization of FoldingSetTrait for ImmutableList.
...
llvm-svn: 59387
2008-11-16 04:23:49 +00:00
Zhongxing Xu
b62b5ce749
Fix 80-column violation.
...
llvm-svn: 59385
2008-11-16 04:14:33 +00:00
Zhongxing Xu
bce4760ed8
Add Profile method to ImmutableList.
...
llvm-svn: 59362
2008-11-15 09:26:02 +00:00
Duncan Sands
dda3cac043
Work around PR1000.
...
llvm-svn: 58984
2008-11-10 10:05:09 +00:00
Chris Lattner
46166d50a8
split out the functionality of utohexstr into a new utohex_buffer
...
helper. This allows us to convert numbers to hex without necessarily
needing to make a std::string to hold the result.
llvm-svn: 58961
2008-11-10 04:22:46 +00:00
Dan Gohman
1532a1621c
Overload AddInteger on int/long/long long instead of on int/int64_t,
...
to avoid overload ambiguities. This fixes build errors introduced
by r58623.
llvm-svn: 58632
2008-11-03 19:40:18 +00:00
Nick Lewycky
3315ae6e08
Typo
...
llvm-svn: 58594
2008-11-03 03:50:40 +00:00
Daniel Dunbar
ec8e99098f
Return bool (inserted) from StringSet::insert as for StringMap::insert.
...
llvm-svn: 58268
2008-10-27 20:50:02 +00:00
David Greene
e8f05397ca
Add STL-style typedefs and default constructors to make it possible to
...
use DenseMap in more contexts.
llvm-svn: 58256
2008-10-27 18:15:15 +00:00
Ted Kremenek
fb81568ed6
Fix incorrect testing for the end of the both strings in CStrInCStrNoCase. This could cause a read-out-of-bounds error if s2 is smaller than s1.
...
llvm-svn: 58009
2008-10-22 23:16:52 +00:00
Ted Kremenek
270f3e22d5
constify some methods and variables in ImmutableList.
...
llvm-svn: 57894
2008-10-21 05:59:33 +00:00
Dan Gohman
440dea174f
Implement a SmallVector insert method that can insert multiple
...
copies of a value, and add several additional utilities to make
SmallVector better conform to the Container concept.
llvm-svn: 57616
2008-10-16 00:15:24 +00:00
Dan Gohman
307b390231
Fix several places that called mapped_iterator's constructor without
...
passing in a function object.
llvm-svn: 57615
2008-10-16 00:12:39 +00:00
Daniel Dunbar
2f3ec96450
Add llvm::hexdigit to StringExtras (number -> hexadecimal char)
...
llvm-svn: 57536
2008-10-14 23:26:20 +00:00
Chris Lattner
7e58510a50
this was to be removed after 2.4 branched.
...
llvm-svn: 57422
2008-10-12 18:57:09 +00:00