Chris Lattner
111de6b5cf
Add support for programs with a null argv[0]
...
llvm-svn: 25379
2006-01-17 00:32:28 +00:00
Duraid Madina
392483ef73
MERRY CHRISTMAS EVERYONE!!! (what better way to spend christmas than
...
to try building LLVM on HP-UX! (the Right Way seems to be to tear out
the ancient STL that HP ship and use http://incubator.apache.org/stdcxx/ )
llvm-svn: 25012
2005-12-26 04:56:16 +00:00
Chris Lattner
5853bd7984
indicate when a tool is a debug build.
...
llvm-svn: 24374
2005-11-16 06:36:47 +00:00
Chris Lattner
f1d821b665
Allow tools with "consume after" options (like lli) to take more positional
...
opts than they take directly. Thanks to John C for pointing this problem
out to me!
llvm-svn: 22717
2005-08-08 21:57:27 +00:00
Chris Lattner
e30b898fec
Reject command lines that have too many positional arguments passed (e.g.,
...
'opt x y'). This fixes PR493.
Patch contributed by Owen Anderson!
llvm-svn: 22705
2005-08-08 17:25:38 +00:00
Chris Lattner
f79a885a30
Capitalize
...
llvm-svn: 21964
2005-05-13 19:49:09 +00:00
Chris Lattner
593c0e8957
Do not use "" as a sentinal for a missing argument! This fixes PR560.
...
llvm-svn: 21850
2005-05-10 23:20:17 +00:00
Misha Brukman
933cdaf254
Remove trailing whitespace
...
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Chris Lattner
786b30e148
Work around GCC PR19958, which causes programs to sometimes crash after
...
printing help output or version info.
llvm-svn: 20180
2005-02-14 19:17:29 +00:00
Reid Spencer
1c55479db5
Implement and document prefix options with arbitrary values including an
...
= sign. This needed to support -DNAME=value options as pass-through in
llvmc.
llvm-svn: 18203
2004-11-24 06:13:42 +00:00
Tanya Lattner
a2cf139875
Fixed assertion from triggering. We need to check if the commandline map is empty before checking if an arg exists.
...
llvm-svn: 18057
2004-11-20 23:35:20 +00:00
Chris Lattner
1d11859e8c
Patches to avoid "leaking" memory on process exit. Patch contributed by
...
Morten Ofstad!
llvm-svn: 17998
2004-11-19 17:08:15 +00:00
Reid Spencer
e64ca0563a
Add a comment to some code that at first glance just doesn't look right.
...
llvm-svn: 17886
2004-11-16 06:50:36 +00:00
Reid Spencer
fdf8ac8d29
Per code review:
...
*Implement/Document the cl::extrahelp feature instead of the MoreHelp ptr.
llvm-svn: 17871
2004-11-16 06:11:52 +00:00
Reid Spencer
8bf3328ca7
Implement the MoreHelp utility that calls a function to printmore help information if the MoreHelp global is not null.
...
llvm-svn: 17774
2004-11-14 22:04:00 +00:00
Misha Brukman
ce8c2c2aee
Replace uses of llvm.org with llvm.cs.uiuc.edu
...
llvm-svn: 17549
2004-11-07 00:58:38 +00:00
Reid Spencer
c4abcbefb1
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
fc74d1fba8
Make CommandLine prefix error output with the name of the program.
...
llvm-svn: 16129
2004-09-01 04:41:28 +00:00
Reid Spencer
45d12b6601
Allow any cl::opt to use the method getPosition() to retrieve the option's
...
absolute position on the command line. Similarly allow any cl::list to
use the method getPosition(n) to retrieve the absolute position of the nth
option in the list. This provides support for two things: (a) options like
-l that are actually positional and their order of occurrence matters when
they are intermixed with positional arguments like "a.o"; and (b) options
like -x LANG which affect only the positional arguments that come after
the option. In both cases, knowing the absolute position of a given option
helps.
llvm-svn: 15725
2004-08-13 19:47:30 +00:00
Reid Spencer
7a574d3872
Add a --version option for every tool that prints out:
...
Low Level Virtual Machine ($PACKAGE_NAME) $PACKAGE_VERSION
llvm-svn: 15454
2004-08-04 00:36:06 +00:00
Chris Lattner
9d3ff75eba
Add a workaround for a GCC 3.3.2 bug
...
llvm-svn: 14976
2004-07-18 21:56:20 +00:00
Chris Lattner
5d7966a0ea
Fix compilation on internix
...
llvm-svn: 14588
2004-07-03 01:21:05 +00:00
Chris Lattner
88706ea172
Implement the new cl::PositionalEatsArgs flag, refactor code a bit
...
llvm-svn: 13388
2004-05-06 22:04:31 +00:00
Alkis Evlogimenos
d6bb9674d9
Hide variable from other functions.
...
llvm-svn: 12118
2004-03-04 17:50:44 +00:00
Chris Lattner
2fdf5e32aa
Finegrainify namespacification
...
llvm-svn: 10464
2003-12-14 21:35:53 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Brian Gaeke
254dd12289
Change to use strtoul instead of strtoll.
...
llvm-svn: 9010
2003-10-10 17:01:36 +00:00
Brian Gaeke
b121c72006
Add missing apostrophe. It's been bugging me for years.
...
No really, years.
llvm-svn: 8566
2003-09-16 18:00:35 +00:00
Misha Brukman
ed4039f715
Fixed spelling & grammar.
...
llvm-svn: 8559
2003-09-16 15:31:46 +00:00
Brian Gaeke
294589d7f6
lib/Support/CommandLine.cpp:
...
Many changes suggested by Chris. It's okay, I'll recover from the emotional
damage...maybe someday. :-)
Collapse ParseCStringVector into ParseStringVector. Comment it.
Make it take a const input.
Use std::string::npos instead of -1 (what a mouthful!)
Make ParseEnvironmentOptions take const inputs.
Check its args at the very beginning.
Strdup all the contents of newArgv and free them all at the end.
include/Support/CommandLine.h:
Constify progName and envVar arguments to ParseEnvironmentOptions().
llvm-svn: 7905
2003-08-15 21:05:57 +00:00
Brian Gaeke
1fea9addaa
Add support for reading command line arguments from an environment variable.
...
llvm-svn: 7851
2003-08-14 22:00:59 +00:00
Chris Lattner
78f944d347
Add support for "named positional arguments"
...
llvm-svn: 7421
2003-07-30 17:34:02 +00:00
Misha Brukman
74d17238cb
Fixed grammatical error.
...
llvm-svn: 7160
2003-07-10 21:38:28 +00:00
Misha Brukman
c12238543a
Lowercase versions of `occurrence' need to be spelled correctly, too.
...
llvm-svn: 7142
2003-07-10 17:05:26 +00:00
Misha Brukman
14194dcdae
Occurrence' has no
a' and the `r' is doubled.
...
llvm-svn: 7140
2003-07-10 16:49:51 +00:00
Chris Lattner
4d3ee0f3b1
Add support for 'unsigned' command line arguments
...
llvm-svn: 6928
2003-06-28 15:47:20 +00:00
Chris Lattner
7099c87692
Add new CommaSeparated option modifier
...
llvm-svn: 6294
2003-05-22 20:26:17 +00:00
Chris Lattner
802d657a39
Destroy using declarations
...
llvm-svn: 6291
2003-05-22 20:06:43 +00:00
Chris Lattner
a4b59e7f2b
Simplify writing custom parsers.
...
llvm-svn: 3256
2002-08-07 18:36:37 +00:00
Chris Lattner
86b1459fdb
Fix lli with no arguments
...
llvm-svn: 3226
2002-08-02 21:51:29 +00:00
Chris Lattner
e6e1bc4719
Fix bug that was causing problems for lli
...
llvm-svn: 3176
2002-07-31 16:29:43 +00:00
Chris Lattner
abbfb07573
* Fix assertion failure caused by command line argument getting removed after
...
the map was freed.
* Cleanup code a bit
llvm-svn: 3121
2002-07-29 20:58:42 +00:00
Chris Lattner
86e5192d95
Remove needless #include
...
llvm-svn: 3117
2002-07-27 05:25:29 +00:00
Chris Lattner
05fe67c0d2
*** empty log message ***
...
llvm-svn: 3075
2002-07-25 06:17:51 +00:00
Chris Lattner
b0e9d1b80c
Fix a bug exposed by lli
...
llvm-svn: 3049
2002-07-24 20:15:13 +00:00
Chris Lattner
d39f1f6b60
*** empty log message ***
...
llvm-svn: 2999
2002-07-23 17:15:12 +00:00
Chris Lattner
706b40541e
Minor bugfix, prevents error in LLI
...
llvm-svn: 2989
2002-07-22 02:21:57 +00:00
Chris Lattner
435788e8c3
Checkin CommandLine 2.0
...
llvm-svn: 2982
2002-07-22 02:07:59 +00:00
Chris Lattner
555163a0ab
Add ability to update existing variables with values read from the command line
...
to certain classes. This is nice because it means that in header files we can
just declare a value, and still have that value be set based on a command-line
argument. The difference is now that the #include of CommandLine.h does not
need to go into the header file as well.
llvm-svn: 2708
2002-05-22 17:03:05 +00:00