Chris Lattner
fbaac77c70
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
deab9dee12
Remove getIEEEFloatParts and getIEEEDoubleParts. They are not needed.
...
llvm-svn: 85358
2009-10-28 01:08:17 +00:00
Evan Cheng
67c902147e
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
56869f22c4
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
0d670b5b92
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
04f049f2f5
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
59449581b2
Remove llvm::EscapeString, raw_ostream::write_escaped is much faster.
...
llvm-svn: 84357
2009-10-17 20:43:29 +00:00
Daniel Dunbar
4108c43fd1
Add raw_ostream::write_escaped, for writing escaped strings.
...
llvm-svn: 84355
2009-10-17 20:43:08 +00:00
Daniel Dunbar
77668004c4
Move StringMap's string has function into StringExtras.h
...
llvm-svn: 84344
2009-10-17 18:21:06 +00:00
Chris Lattner
4794b2b27b
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
27f2049305
add haiku support, patch by Paul Davey!
...
llvm-svn: 84238
2009-10-16 02:06:30 +00:00
Jeffrey Yasskin
e2595b5be6
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
08506ee6b0
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
92e3a06623
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
819d15c7d9
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
37d8015dc1
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
f08d2db928
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
688f991b38
wrap long lines.
...
llvm-svn: 82715
2009-09-24 21:44:20 +00:00
Chris Lattner
1ce83629df
tidy up, fix a memory leak in Regex::isValid
...
llvm-svn: 82707
2009-09-24 20:15:51 +00:00
Chris Lattner
4e37f877b5
reapply r82348 with a fix, thanks Jeffrey.
...
llvm-svn: 82683
2009-09-24 05:38:36 +00:00
Jeffrey Yasskin
a75d6bf3a8
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
78faee0664
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
c827d9ee0e
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
5a3a854205
simplify as daniel suggests
...
llvm-svn: 82415
2009-09-20 22:56:43 +00:00
Chris Lattner
78f908c877
tidy up
...
llvm-svn: 82384
2009-09-20 07:16:54 +00:00
Chris Lattner
56efff07f5
smallvectorize getExtraOptionNames
...
llvm-svn: 82377
2009-09-20 06:21:43 +00:00
Chris Lattner
131dca9c48
minor cleanups.
...
llvm-svn: 82375
2009-09-20 06:18:38 +00:00
Chris Lattner
00f53807c3
strength reduce further StringRef-> const char*, saving another 620 bytes.
...
llvm-svn: 82372
2009-09-20 05:53:47 +00:00
Chris Lattner
b1f2e101db
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
6ec8caf003
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
8d0309daa0
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
64dbb5ca5a
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
28610b9878
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
41f8b0b7a6
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
f74e28abfa
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
e7c1e210c7
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
ecbb126e34
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
7d6781b0fe
Tabs -> spaces, and remove trailing whitespace.
...
llvm-svn: 82355
2009-09-20 02:20:51 +00:00
Chris Lattner
5a3fa4ef33
convert argname to StringRef, simplifying LookupOption.
...
llvm-svn: 82352
2009-09-20 02:02:24 +00:00
Chris Lattner
0a40a975dd
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
40fef8032e
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
77c2724360
rewrite ParseCStringVector in terms of stringref.
...
llvm-svn: 82348
2009-09-20 01:33:46 +00:00
Chris Lattner
372a8ae403
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
1b88fbdaa3
coding style cleanup
...
llvm-svn: 82346
2009-09-20 01:11:23 +00:00
Chris Lattner
3b8adaf488
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
ca2552d9f9
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
Chris Lattner
fa9c6f43a0
Avoid some temporary strings.
...
llvm-svn: 82339
2009-09-19 23:59:02 +00:00
Chris Lattner
84c1527b6b
add some more overloads of StringRef::getAsInteger for
...
common and useful integer types.
llvm-svn: 82338
2009-09-19 23:58:48 +00:00
Chris Lattner
68ee70035e
provide a "strtoull" operation that works on StringRef's.
...
llvm-svn: 82322
2009-09-19 19:47:14 +00:00
Chris Lattner
aecd74d895
convert a bunch of std::strings to use StringRef. This should eliminate
...
a massive number of temporary strings created when parsing a command line.
More still left to eliminate.
llvm-svn: 82318
2009-09-19 18:55:05 +00:00