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

16 Commits

Author SHA1 Message Date
NAKAMURA Takumi
c1197d9021 Whitespace.
llvm-svn: 244431
2015-08-10 04:22:09 +00:00
Chandler Carruth
f46ea62013 [ADT] Teach DenseMap to support StringRef keys.
While often you want to use something specialized like StringMap, when
the strings already have persistent storage a normal densemap over them
can be more efficient.

This can't go into StringRef.h because of really obnoxious header chains
from the hashing code to the endian detection code to CPU feature
detection code to StringMap.

llvm-svn: 240528
2015-06-24 10:06:29 +00:00
Richard Smith
865f47cbb6 Fix integer undefined behavior due to signed left shift overflow in LLVM.
Reviewed offline by chandlerc.

llvm-svn: 162623
2012-08-24 23:29:28 +00:00
Ahmed Charles
bf926759cc Fix various issues (or do cleanups) found by enabling certain MSVC warnings.
- Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default.
- Remove misplaced llvm_unreachable.
- Add static to a declaration of a function on MSVC x86 only.
- Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable.

llvm-svn: 150364
2012-02-13 06:30:56 +00:00
Eli Friedman
400fe75ba1 Use unsigned multiply to hash integers, so we don't end up with undefined behavior for large signed integers. Based on patch by Ahmed Charles.
llvm-svn: 141827
2011-10-12 22:25:45 +00:00
Nick Lewycky
31d1c92d69 In DenseMapInfo<pair<T, U>> tombstone key, use the tombstone for T and U instead
of the empty key for U. This shouldn't really matter because the tombstone key
for the pair was still distinct from every other key, but it is odd. Patch by
Michael Ilseman!

llvm-svn: 136336
2011-07-28 06:48:33 +00:00
Chris Lattner
7605c67ada drive by bug fix: DenseMapInfo::isEqual should be determined according to
isEqual of its members, not operator==.

llvm-svn: 129233
2011-04-09 21:20:23 +00:00
Chandler Carruth
4d8fbad207 Add a specialization for 'long', a hole in the set of fundamental
specializations provided here. This is a little annoying because its size
changes from platform to platform. If possible, I may follow up with a patch
that uses standard constants to simplify much of this, but assuming for now
that was avoided for a reason.

llvm-svn: 117880
2010-10-31 22:57:03 +00:00
Evan Cheng
f0f25bd8e6 Add DenseMapInfo for int.
llvm-svn: 102652
2010-04-29 18:50:35 +00:00
Evan Cheng
4045e89a8f Add DenseMapInfo for signed long long.
llvm-svn: 94146
2010-01-22 03:33:01 +00:00
Chris Lattner
587962c667 Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.

llvm-svn: 91421
2009-12-15 07:26:43 +00:00
Eric Christopher
41d8dc960b More warnings patrol: Another unused argument and more implicit
conversions.

llvm-svn: 84382
2009-10-17 23:56:18 +00:00
Eric Christopher
a7407c0921 Remove a bunch of unused arguments from functions, silencing a
warning.

llvm-svn: 84130
2009-10-14 20:28:33 +00:00
Duncan Sands
8c36c0f009 Mark constants as unsigned, as pointed out by icc
warnings (#174).  Patch by Erick Tryzelaar.

llvm-svn: 81111
2009-09-06 11:45:14 +00:00
Mike Stump
294213c735 Allow unsigned long long DenseMapInfo.
llvm-svn: 80118
2009-08-26 18:02:19 +00:00
Dan Gohman
3d7cadb0c2 Split DenseMapInfo into a separate header file, so that it can be
included separately.

llvm-svn: 77693
2009-07-31 18:18:19 +00:00