Daniel Dunbar
57f21a7c25
Report the detected host CPU in --version.
...
llvm-svn: 88813
2009-11-14 21:36:07 +00:00
Sandeep Patel
a167903217
Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
...
llvm-svn: 86797
2009-11-11 03:23:46 +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
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
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
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
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
Chris Lattner
b29a51b4d4
Avoid some temporary strings.
...
llvm-svn: 82339
2009-09-19 23:59:02 +00:00
Chris Lattner
86c1fbbc0a
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
Benjamin Kramer
b8b2ef98f4
Try to speed up the slowest parts of the CommandLine library
...
- Replace std::map<std::string with StringMap
- Eliminate unnecessary std::string copies
- ~10% speed-up for clang's testsuite on my machine (debug build)
llvm-svn: 82312
2009-09-19 10:01:45 +00:00
Daniel Dunbar
79025e46a2
Show derived host triple in --version.
...
llvm-svn: 80855
2009-09-02 23:52:38 +00:00
Chris Lattner
89e48e8aae
clean up #includes.
...
llvm-svn: 79857
2009-08-23 18:09:02 +00:00
Benjamin Kramer
d76413b416
Remove uses of Streams.h from CommandLine.cpp, fix some whitespace and other minor tweaks.
...
llvm-svn: 79847
2009-08-23 10:01:13 +00:00
Chris Lattner
e22a1d941e
remove some uses of llvm/Support/Streams.h
...
llvm-svn: 79842
2009-08-23 08:43:55 +00:00
Benjamin Kramer
c2015778ee
Remove duplicated colons and spaces.
...
llvm-svn: 77892
2009-08-02 12:13:02 +00:00
Daniel Dunbar
fe859a94dc
Sort list of targets in --version.
...
llvm-svn: 77127
2009-07-26 05:09:50 +00:00
Daniel Dunbar
ffc135d4d5
Add registered target list to --version output.
...
llvm-svn: 75889
2009-07-16 02:06:09 +00:00
Torok Edwin
f955a6ef49
llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
...
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").
llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Torok Edwin
ae8a3ff177
assert(0) -> LLVM_UNREACHABLE.
...
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Torok Edwin
9b41a5faf2
Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
...
and abort()/exit() -> llvm_report_error().
llvm-svn: 75363
2009-07-11 13:10:19 +00:00
Bill Wendling
3f4c6171d1
Add support for a character after a command line option. Like '-Os'.
...
llvm-svn: 70437
2009-04-29 23:26:16 +00:00
Chris Lattner
fc47fb0629
Remove AllowInverse: it leaks memory and is not the right
...
abstraction for CommandLine.
llvm-svn: 68588
2009-04-08 03:43:51 +00:00
Misha Brukman
ea884c9e5e
* Fixed spelling of `invertible'
...
* Simplified if statement
llvm-svn: 68163
2009-04-01 00:15:46 +00:00
Chris Lattner
601a4d8c70
move a large method out of line.
...
llvm-svn: 67892
2009-03-28 02:08:47 +00:00
Mike Stump
4c8ca99bb1
Improve -fno-opt style option processing to not require an extra
...
option to make the -fno- form on the option. We also document the new
form in the CommandLine documentation.
llvm-svn: 63559
2009-02-02 22:48:49 +00:00
Mike Stump
a0b25f92ce
Add opposite_of and inverse_opt to support -fno- style options. This
...
is necessary for eventual gcc commmand line compatibility.
llvm-svn: 63384
2009-01-30 08:19:46 +00:00
Mikhail Glushenkov
2b0004bd39
Clarify comment.
...
llvm-svn: 63171
2009-01-28 03:46:22 +00:00
Mikhail Glushenkov
898af4fdfa
Mimic gcc behaviour with regard to response files.
...
llvm-svn: 62688
2009-01-21 13:14:02 +00:00
Mikhail Glushenkov
b0aa02acee
Support for multi-valued options in CommandLine
...
Makes possible to specify options that take multiple arguments (a-la
-sectalign on Darwin). See documentation for details.
llvm-svn: 62372
2009-01-16 22:54:19 +00:00
Steve Naroff
266cb1d2fa
Tweak --version to include the date and time.
...
llvm-svn: 61378
2008-12-23 18:41:47 +00:00
Nuno Lopes
360aae23b1
remove unused var
...
llvm-svn: 60770
2008-12-09 17:04:06 +00:00
Dan Gohman
9543edc4ef
Fix command-line option printing to print two spaces where needed,
...
instead of requiring all "short description" strings to begin with
two spaces. This makes these strings less mysterious, and it fixes
some cases where short description strings mistakenly did not
begin with two spaces.
llvm-svn: 57521
2008-10-14 20:25:08 +00:00