David Blaikie
7503072263
Correct use of const in ParseCommandLineOptions
...
llvm-svn: 149999
2012-02-07 19:36:01 +00:00
Craig Topper
e18a06be4d
Convert assert(0) to llvm_unreachable
...
llvm-svn: 149849
2012-02-05 22:14:15 +00:00
David Blaikie
1040475c84
Reword comment based on feedback by Duncan Sands.
...
llvm-svn: 148809
2012-01-24 16:18:30 +00:00
David Blaikie
cafc52ba9a
Changing bitfield enums to unsigned ints.
...
This was suggested by Chandler Carruth on the basis of past experience with
esoteric compilers/quirks relating to signed enums.
llvm-svn: 148746
2012-01-23 23:27:47 +00:00
David Blaikie
0c22143732
Simplify llvm: 🆑 :Option by using a bit field instead of manual bit packing.
...
This still preserves the same total layout.
Previously it looked like:
*** Dumping AST Record Layout
0 | class llvm:🆑 :Option
0 | (Option vtable pointer)
8 | int NumOccurrences
12 | int Flags
16 | unsigned int Position
20 | unsigned int AdditionalVals
24 | class llvm:🆑 :Option * NextRegistered
32 | const char * ArgStr
40 | const char * HelpStr
48 | const char * ValueStr
sizeof=56, dsize=56, align=8
nvsize=56, nvalign=8
Now it looks like:
*** Dumping AST Record Layout
0 | class llvm:🆑 :Option
0 | (Option vtable pointer)
8 | int NumOccurrences
12 | enum NumOccurrencesFlag Occurrences
12 | unsigned int Value
12 | enum OptionHidden HiddenFlag
12 | enum FormattingFlags Formatting
13 | unsigned int Misc
16 | unsigned int Position
20 | unsigned int AdditionalVals
24 | class llvm:🆑 :Option * NextRegistered
32 | const char * ArgStr
40 | const char * HelpStr
48 | const char * ValueStr
sizeof=56, dsize=56, align=8
nvsize=56, nvalign=8
llvm-svn: 148736
2012-01-23 22:22:44 +00:00
David Blaikie
d951c64db1
Add some missing anchors.
...
llvm-svn: 145578
2011-12-01 08:00:17 +00:00
Benjamin Kramer
8e526ee5b0
CommandLine: Add support for 64 bit unsigned integer options.
...
llvm-svn: 139848
2011-09-15 21:17:37 +00:00
Chandler Carruth
6931004b83
Add an extension point to the CommandLine library where clients can
...
register extra version information to be printed. This is designed to
allow those tools which link in various targets to also print those
registered targets under --version.
Currently this printing logic is embedded into the Support library
directly; a huge layering violation. This is the first step to hoisting
it out into the tools without adding lots of duplicated code.
llvm-svn: 135755
2011-07-22 07:50:40 +00:00
Frits van Bommel
20f0d49a4a
Comment out some unused parameter names to silence out-of-tree -Wunused warnings.
...
llvm-svn: 129988
2011-04-22 11:36:45 +00:00
Andrew Trick
f275156c40
Fix a typo.
...
llvm-svn: 128912
2011-04-05 19:13:11 +00:00
Andrew Trick
7e2e555075
Added *hidden* flags -print-options and -print-all-options so
...
developers can see if their driver changed any cl::Option's. The
current implementation isn't perfect but handles most kinds of
options. This is nice to have when decomposing the stages of
compilation and moving between different drivers. It's also a good
sanity check when comparing results produced by different command line
invocations that are expected to produce the comparable results.
Note: This is not an attempt to prolong the life of cl::Option. On the
contrary, it's a placeholder for a feature that must exist when
cl::Option is replaced by a more appropriate framework. A new
framework needs: a central option registry, dynamic name lookup,
non-global containers of option values (e.g. per-module,
per-function), *and* the ability to print options values and their defaults at
any point during compilation.
llvm-svn: 128910
2011-04-05 18:54:36 +00:00
Mikhail Glushenkov
ba7b4da6de
Trailing whitespace.
...
llvm-svn: 110679
2010-08-10 14:49:24 +00:00
Rafael Espindola
2145c31de3
Some cleanup. Use a class (OptionInfo) instead of a pair of a pair and remove
...
some default values that are not used.
llvm-svn: 110485
2010-08-06 23:03:52 +00:00
Duncan Sands
ca05b607b7
Refer to -help instead of --help since this is what tools themselves say.
...
Also, have tools output -help-hidden rather than refer to --help-hidden,
for consistency, and likewise adjust documentation. This doesn't change
every mention of --help, only those which seemed clearly safe.
llvm-svn: 96578
2010-02-18 14:08:13 +00:00
Chris Lattner
4d97e42ba6
enhance bits_storage to work with enums by using a c-style
...
cast instead of reinterpret_cast, fixing PR6243. Apparently
reinterpret_cast and I aren't getting along today.
llvm-svn: 95622
2010-02-09 00:05:45 +00:00
Anders Carlsson
25a1bae472
Add qualifiers for calls to member functions in dependent bases.
...
llvm-svn: 91087
2009-12-11 01:04:42 +00:00
Douglas Gregor
2272ca3d44
Move llvm: 🆑 :opt's conversion function into the base classes that
...
actually need that conversion function. Silences a Clang++ warning.
llvm-svn: 86148
2009-11-05 18:30:50 +00:00
Chris Lattner
d04294d7b8
Declare classes with matched tags, pointed out by a clang++ warning.
...
llvm-svn: 86144
2009-11-05 17:51:44 +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
Evan Cheng
1a5c370be3
Rename enum NumOccurrences to NumOccurrencesFlag since there is a member named NumOccurrences.
...
llvm-svn: 83273
2009-10-04 05:25:42 +00:00
Chris Lattner
acb70ff251
smallvectorize getExtraOptionNames
...
llvm-svn: 82377
2009-09-20 06:21:43 +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
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
Daniel Dunbar
9bbadad09d
Fix some comments referring to std::cerr.
...
llvm-svn: 77931
2009-08-03 01:02:24 +00:00
Benjamin Kramer
c2015778ee
Remove duplicated colons and spaces.
...
llvm-svn: 77892
2009-08-02 12:13:02 +00:00
Mikhail Glushenkov
dd69113516
Fix comment.
...
llvm-svn: 73601
2009-06-17 03:10:10 +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
Dan Gohman
770f4158e5
Use CHAR_BIT instead of hard-coding 8 in several places where it
...
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.
llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Misha Brukman
ea884c9e5e
* Fixed spelling of `invertible'
...
* Simplified if statement
llvm-svn: 68163
2009-04-01 00:15:46 +00:00
Bill Wendling
668e03b2b8
Constify check. This fixes PR3900.
...
llvm-svn: 68013
2009-03-29 20:08:56 +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
f25de0da23
Allow invertable -xno- style optins as well.
...
llvm-svn: 67862
2009-03-27 20:12:55 +00:00
Sebastian Redl
e4e5b1c2f2
Fix the Win32 VS2008 build:
...
- Make type declarations match the struct/class keyword of the definition.
- Move AddSignalHandler into the namespace where it belongs.
- Correctly call functions from template base.
- Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.
llvm-svn: 67347
2009-03-19 23:26:52 +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
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
Misha Brukman
2d4b2dd2d3
* Alphabetized system headers per the style guide
...
* Minor spacing and comment cleanups
llvm-svn: 61590
2009-01-02 20:26:30 +00:00
Steve Naroff
a1c616ae1d
Silence a warning about "*/" outside a comment.
...
llvm-svn: 51287
2008-05-20 00:46:15 +00:00
Bill Wendling
1866fa680f
Remove warnings about unused parameters and shadowed variables.
...
llvm-svn: 51266
2008-05-19 20:15:12 +00:00
Evan Cheng
d9353009b7
Fix more -Wshorten-64-to-32 warnings.
...
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Mikhail Glushenkov
4c358b3125
Add support for response files to the CommandLine library.
...
llvm-svn: 50355
2008-04-28 16:44:25 +00:00
Dan Gohman
48d03d5a2d
Add explicit keywords.
...
llvm-svn: 47382
2008-02-20 16:44:09 +00:00
Anton Korobeynikov
9c87c6526e
Add 'sink' cmdline option. Patch by Mikhail Glushenkov!
...
llvm-svn: 47377
2008-02-20 12:38:07 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Dan Gohman
d174f83e57
Remove an unnecessary friend declaration.
...
llvm-svn: 42805
2007-10-09 18:39:48 +00:00
Chris Lattner
03d9efc98a
update prototype, fixing build error
...
llvm-svn: 42789
2007-10-09 16:27:44 +00:00
Dan Gohman
2fb0a249d7
Pass argc by value, not by reference, since it isn't modified.
...
llvm-svn: 42788
2007-10-09 16:04:57 +00:00
Dan Gohman
8c31acb71e
Fix grammar in a comment.
...
llvm-svn: 42748
2007-10-08 15:10:04 +00:00
Dan Gohman
7fa473514d
Add explicit keywords.
...
llvm-svn: 42747
2007-10-08 15:08:41 +00:00