1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 14:32:51 +01:00
Commit Graph

1135 Commits

Author SHA1 Message Date
Mikhail Glushenkov
9c1ea77f8c Trailing whitespace.
llvm-svn: 86347
2009-11-07 06:33:12 +00:00
Daniel Dunbar
4daaf9d3f4 Pass StringRef by value.
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Duncan Sands
7d20275318 A value is only assigned to errno if NumRead equals -1, so do
not reason based on errno if NumRead has a different value.

llvm-svn: 86046
2009-11-04 20:50:23 +00:00
Duncan Sands
d4b8f9ee93 Make this code more robust by not thinking we are making progress
if zero bytes were read.

llvm-svn: 85922
2009-11-03 19:10:22 +00:00
Chris Lattner
a77d439989 add a new 'SetCurrentDebugType' API (requested by Andrew Haley for JIT
stuff) to programmatically control the current debug flavor.  While 
I'm at it, doxygenate Debug.h and clean it up.

llvm-svn: 85395
2009-10-28 15:32:19 +00:00
Evan Cheng
1c7dfce330 Remove getIEEEFloatParts and getIEEEDoubleParts. They are not needed.
llvm-svn: 85358
2009-10-28 01:08:17 +00:00
Evan Cheng
b6b5214744 Add new APFloat methods that return sign, exp, and mantissa of ieee float and double values.
llvm-svn: 85318
2009-10-27 21:35:42 +00:00
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Dale Johannesen
3f91e235b8 Commit fixes for half precision I noted in review, so
they don't get lost; I don't think the originator has
write access.

llvm-svn: 84928
2009-10-23 04:02:51 +00:00
Daniel Dunbar
b67b5bb0b1 Move UnescapeString to a static function for its sole client; its inefficient and broken.
llvm-svn: 84358
2009-10-17 20:43:42 +00:00
Daniel Dunbar
d537c7d394 Remove llvm::EscapeString, raw_ostream::write_escaped is much faster.
llvm-svn: 84357
2009-10-17 20:43:29 +00:00
Daniel Dunbar
5aa3eebc5d Add raw_ostream::write_escaped, for writing escaped strings.
llvm-svn: 84355
2009-10-17 20:43:08 +00:00
Daniel Dunbar
0107265e33 Move StringMap's string has function into StringExtras.h
llvm-svn: 84344
2009-10-17 18:21:06 +00:00
Chris Lattner
5d2b384837 Add half precision floating point support (float16) to APFloat,
patch by Peter Johnson! (PR5195)

llvm-svn: 84239
2009-10-16 02:13:51 +00:00
Chris Lattner
87bcf3b242 add haiku support, patch by Paul Davey!
llvm-svn: 84238
2009-10-16 02:06:30 +00:00
Jeffrey Yasskin
c4f2348fe7 r83391 was completely broken since Twines keep references to their inputs, and
some of the inputs were temporaries.  Here's a real fix for the miscompilation.
Thanks to sabre for pointing out the problem.

llvm-svn: 83417
2009-10-06 21:45:26 +00:00
Nicolas Geoffray
bde5513d27 Bugfix for the CommaSeparated option. The original code was adding the whole
string at the end of the list, instead of the last comma-separated string.

llvm-svn: 83405
2009-10-06 19:55:53 +00:00
Jeffrey Yasskin
572ef68cf5 Fix PR5112, a miscompilation on gcc-4.0.3. Patch by Collin Winter!
llvm-svn: 83391
2009-10-06 17:25:50 +00:00
Torok Edwin
dd5b0b7cda Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
in RegisterStatistic.

llvm-svn: 82896
2009-09-27 11:08:03 +00:00
Chris Lattner
b47463f436 remove support for "NoSub" from regex. It seems like a minor optimization
and makes the API more annoying.  Add a Regex::getNumMatches() method.

llvm-svn: 82877
2009-09-26 21:27:04 +00:00
Chris Lattner
af2ce37cb3 add and document regex support for FileCheck. You can now do stuff like:
; CHECK: movl {{%e[a-z][xi]}}, %eax

or whatever.

llvm-svn: 82717
2009-09-24 21:47:32 +00:00
Chris Lattner
b1cc232ab2 wrap long lines.
llvm-svn: 82715
2009-09-24 21:44:20 +00:00
Chris Lattner
b1ee14d64b tidy up, fix a memory leak in Regex::isValid
llvm-svn: 82707
2009-09-24 20:15:51 +00:00
Chris Lattner
b8f969471e reapply r82348 with a fix, thanks Jeffrey.
llvm-svn: 82683
2009-09-24 05:38:36 +00:00
Jeffrey Yasskin
2ca8a35c0f Roll back r82348, which introduced an infinite loop in ParseCStringVector() that
a trivial unittest would have caught.  This revision also adds the trivial
unittest.

llvm-svn: 82675
2009-09-24 01:14:07 +00:00
Daniel Dunbar
ac9a646035 Switch FoldingSet::AddString to StringRef based API.
- This also fixes a dereference of std::string::end, which makes MSVC unhappy and was causing all the static analyzer clang tests to fail.

llvm-svn: 82517
2009-09-22 03:34:53 +00:00
Daniel Dunbar
a75b499af8 Workaround what I believe is an MSVC bug where it emits a definition for a
static const class member into each translation unit, with external linkage???
 - If someone understands this issue better, please clue me in, I haven't
   consulted the standard yet.

llvm-svn: 82516
2009-09-22 03:34:40 +00:00
Chris Lattner
86e1459473 simplify as daniel suggests
llvm-svn: 82415
2009-09-20 22:56:43 +00:00
Chris Lattner
268bcdc194 tidy up
llvm-svn: 82384
2009-09-20 07:16:54 +00:00
Chris Lattner
acb70ff251 smallvectorize getExtraOptionNames
llvm-svn: 82377
2009-09-20 06:21:43 +00:00
Chris Lattner
cacb071233 minor cleanups.
llvm-svn: 82375
2009-09-20 06:18:38 +00:00
Chris Lattner
b1db248193 strength reduce further StringRef-> const char*, saving another 620 bytes.
llvm-svn: 82372
2009-09-20 05:53:47 +00:00
Chris Lattner
b7eb454f66 switch an std::string to StringRef, shaving 400 bytes off CommandLine.o
llvm-svn: 82370
2009-09-20 05:48:01 +00:00
Chris Lattner
346c1f60db the switch from std::map -> StringMap caused --help output to be in
non-sorted order, restore the sort.

llvm-svn: 82368
2009-09-20 05:37:24 +00:00
Chris Lattner
483832f33a eliminate the duplicate detection loop, moving it into the loop that populates the Opts vector in the first place.
llvm-svn: 82367
2009-09-20 05:22:52 +00:00
Chris Lattner
5b8c4b309a Eliminate a masochistic "algorithm" loop, shrinking CommandLine.o from 71524->70700 bytes.
llvm-svn: 82366
2009-09-20 05:18:28 +00:00
Chris Lattner
3a20fca97c don't use count + insert, just do insert + failure. Also, instead of deleting from
the middle of a vector, swap the last element in and pop_back.  Also saves 330 bytes :)

llvm-svn: 82365
2009-09-20 05:15:12 +00:00
Chris Lattner
488639ad3b switch to SmallPtrSet instead of std::set, saving 1K from the
release-asserts .o file (72900->71856).

llvm-svn: 82364
2009-09-20 05:12:14 +00:00
Chris Lattner
80674c762c change an std::sort to an array_pod_sort call, shrinking CommandLine.o by 9%.
llvm-svn: 82363
2009-09-20 05:06:23 +00:00
Chris Lattner
6a6a75896d Several changes together in a murky mess:
1. Change some "\n" -> '\n'.
2. eliminte some std::string's by using raw_ostream::indent.
3. move a bunch of code out of the main arg parser routine into
   a new static HandlePrefixedOrGroupedOption function.
4. Greatly simplify the implementation of getOptionPred, and make
   it avoid splitting prefix options at = when that doesn't match
   a non-prefix option.

llvm-svn: 82362
2009-09-20 05:03:30 +00:00
Daniel Dunbar
16b2c02cd3 Fix refacto, this code was expecting to stride past the argument prefix.
llvm-svn: 82360
2009-09-20 04:03:41 +00:00
Daniel Dunbar
378331a13d Tabs -> spaces, and remove trailing whitespace.
llvm-svn: 82355
2009-09-20 02:20:51 +00:00
Chris Lattner
462444d1c8 convert argname to StringRef, simplifying LookupOption.
llvm-svn: 82352
2009-09-20 02:02:24 +00:00
Chris Lattner
2c4d26f38f convert 'Value' to StringRef which makes it easier to
maintain the "null is unspecified, empty is empty" semantics.

llvm-svn: 82351
2009-09-20 01:53:12 +00:00
Chris Lattner
08e8c98fec Change CommaSeparated processing to do it with StringRef instead of temporary std::strings.
This requires StringRef'izing ProvideOption which I also did.

llvm-svn: 82350
2009-09-20 01:49:31 +00:00
Chris Lattner
5b5a0ec095 rewrite ParseCStringVector in terms of stringref.
llvm-svn: 82348
2009-09-20 01:33:46 +00:00
Chris Lattner
72732da2f0 move a couple non-trivial methods out of line, add new
find_first_of/find_first_of methods.

llvm-svn: 82347
2009-09-20 01:22:16 +00:00
Chris Lattner
d32099fb1f coding style cleanup
llvm-svn: 82346
2009-09-20 01:11:23 +00:00
Chris Lattner
85478e8cd1 convert a bunch more stuff to use StringRef. The ArgName arguments are now
stringref because they may not be nul terminated.  For options like -Lfoo
this now avoids a O(n)  temporary std::strings where N is the length of 
the string after -L.

llvm-svn: 82345
2009-09-20 00:40:49 +00:00
Chris Lattner
bb111eeae4 avoid a bunch of malloc thrashing for PositinoalVals by eliminating
a std::vector and a bunch of std::string temporaries.

llvm-svn: 82341
2009-09-20 00:07:40 +00:00