summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* reapply r82348 with a fix, thanks Jeffrey.Chris Lattner2009-09-241-33/+24
| | | | llvm-svn: 82683
* Roll back r82348, which introduced an infinite loop in ParseCStringVector() thatJeffrey Yasskin2009-09-241-22/+33
| | | | | | | a trivial unittest would have caught. This revision also adds the trivial unittest. llvm-svn: 82675
* tidy upChris Lattner2009-09-201-1/+1
| | | | llvm-svn: 82384
* smallvectorize getExtraOptionNamesChris Lattner2009-09-201-2/+1
| | | | llvm-svn: 82377
* minor cleanups.Chris Lattner2009-09-201-22/+24
| | | | llvm-svn: 82375
* strength reduce further StringRef-> const char*, saving another 620 bytes.Chris Lattner2009-09-201-5/+11
| | | | llvm-svn: 82372
* switch an std::string to StringRef, shaving 400 bytes off CommandLine.oChris Lattner2009-09-201-11/+10
| | | | llvm-svn: 82370
* the switch from std::map -> StringMap caused --help output to be in Chris Lattner2009-09-201-5/+15
| | | | | | non-sorted order, restore the sort. llvm-svn: 82368
* eliminate the duplicate detection loop, moving it into the loop that ↵Chris Lattner2009-09-201-13/+6
| | | | | | populates the Opts vector in the first place. llvm-svn: 82367
* Eliminate a masochistic "algorithm" loop, shrinking CommandLine.o from ↵Chris Lattner2009-09-201-13/+8
| | | | | | 71524->70700 bytes. llvm-svn: 82366
* don't use count + insert, just do insert + failure. Also, instead of ↵Chris Lattner2009-09-201-6/+9
| | | | | | | | deleting from the middle of a vector, swap the last element in and pop_back. Also saves 330 bytes :) llvm-svn: 82365
* switch to SmallPtrSet instead of std::set, saving 1K from theChris Lattner2009-09-201-4/+4
| | | | | | release-asserts .o file (72900->71856). llvm-svn: 82364
* change an std::sort to an array_pod_sort call, shrinking CommandLine.o by 9%.Chris Lattner2009-09-201-1/+2
| | | | llvm-svn: 82363
* Several changes together in a murky mess:Chris Lattner2009-09-201-84/+102
| | | | | | | | | | | | 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
* Fix refacto, this code was expecting to stride past the argument prefix.Daniel Dunbar2009-09-201-0/+1
| | | | llvm-svn: 82360
* convert argname to StringRef, simplifying LookupOption.Chris Lattner2009-09-201-21/+22
| | | | llvm-svn: 82352
* convert 'Value' to StringRef which makes it easier to Chris Lattner2009-09-201-12/+8
| | | | | | maintain the "null is unspecified, empty is empty" semantics. llvm-svn: 82351
* Change CommaSeparated processing to do it with StringRef instead of ↵Chris Lattner2009-09-201-21/+26
| | | | | | | | temporary std::strings. This requires StringRef'izing ProvideOption which I also did. llvm-svn: 82350
* rewrite ParseCStringVector in terms of stringref.Chris Lattner2009-09-201-33/+22
| | | | llvm-svn: 82348
* coding style cleanupChris Lattner2009-09-201-13/+12
| | | | llvm-svn: 82346
* convert a bunch more stuff to use StringRef. The ArgName arguments are nowChris Lattner2009-09-201-28/+29
| | | | | | | | 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
* avoid a bunch of malloc thrashing for PositinoalVals by eliminatingChris Lattner2009-09-201-11/+9
| | | | | | a std::vector and a bunch of std::string temporaries. llvm-svn: 82341
* Avoid some temporary strings.Chris Lattner2009-09-191-19/+6
| | | | llvm-svn: 82339
* convert a bunch of std::strings to use StringRef. This should eliminateChris Lattner2009-09-191-48/+56
| | | | | | | a massive number of temporary strings created when parsing a command line. More still left to eliminate. llvm-svn: 82318
* Try to speed up the slowest parts of the CommandLine libraryBenjamin Kramer2009-09-191-28/+28
| | | | | | | | - 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
* Show derived host triple in --version.Daniel Dunbar2009-09-021-0/+2
| | | | llvm-svn: 80855
* clean up #includes.Chris Lattner2009-08-231-8/+4
| | | | llvm-svn: 79857
* Remove uses of Streams.h from CommandLine.cpp, fix some whitespace and other ↵Benjamin Kramer2009-08-231-39/+36
| | | | | | minor tweaks. llvm-svn: 79847
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-231-45/+45
| | | | llvm-svn: 79842
* Remove duplicated colons and spaces.Benjamin Kramer2009-08-021-15/+15
| | | | llvm-svn: 77892
* Sort list of targets in --version.Daniel Dunbar2009-07-261-8/+11
| | | | llvm-svn: 77127
* Add registered target list to --version output.Daniel Dunbar2009-07-161-2/+20
| | | | llvm-svn: 75889
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | 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
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+1
| | | | | | | | | 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
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-2/+2
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Add support for a character after a command line option. Like '-Os'.Bill Wendling2009-04-291-0/+3
| | | | llvm-svn: 70437
* Remove AllowInverse: it leaks memory and is not the rightChris Lattner2009-04-081-21/+0
| | | | | | abstraction for CommandLine. llvm-svn: 68588
* * Fixed spelling of `invertible'Misha Brukman2009-04-011-2/+2
| | | | | | * Simplified if statement llvm-svn: 68163
* move a large method out of line.Chris Lattner2009-03-281-0/+19
| | | | llvm-svn: 67892
* Improve -fno-opt style option processing to not require an extraMike Stump2009-02-021-19/+2
| | | | | | | option to make the -fno- form on the option. We also document the new form in the CommandLine documentation. llvm-svn: 63559
* Add opposite_of and inverse_opt to support -fno- style options. ThisMike Stump2009-01-301-1/+21
| | | | | | is necessary for eventual gcc commmand line compatibility. llvm-svn: 63384
* Clarify comment.Mikhail Glushenkov2009-01-281-1/+6
| | | | llvm-svn: 63171
* Mimic gcc behaviour with regard to response files.Mikhail Glushenkov2009-01-211-16/+15
| | | | llvm-svn: 62688
* Support for multi-valued options in CommandLineMikhail Glushenkov2009-01-161-4/+40
| | | | | | | Makes possible to specify options that take multiple arguments (a-la -sectalign on Darwin). See documentation for details. llvm-svn: 62372
* Tweak --version to include the date and time.Steve Naroff2008-12-231-0/+1
| | | | llvm-svn: 61378
* remove unused varNuno Lopes2008-12-091-2/+0
| | | | llvm-svn: 60770
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-141-1/+1
| | | | | | | | | 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
* Give a proper error message when a command line option is defined more thanMatthijs Kooijman2008-05-301-1/+1
| | | | | | | once (ie, at two different places in the source, not two times on the commandline). llvm-svn: 51771
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-28/+28
| | | | llvm-svn: 50659
* Add support for response files to the CommandLine library.Mikhail Glushenkov2008-04-281-23/+79
| | | | llvm-svn: 50355
OpenPOWER on IntegriCloud