David Blaikie
7900020616
More missing header inclusions from llvm_unreachable migration.
...
llvm-svn: 140369
2011-09-23 05:57:42 +00:00
David Blaikie
83d382b1ca
Switch assert(0/false) llvm_unreachable.
...
llvm-svn: 140367
2011-09-23 05:06:16 +00:00
Chris Lattner
0e62c1cc0b
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
...
them into the clang namespace.
llvm-svn: 135852
2011-07-23 10:55:15 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Nick Lewycky
6da90771c4
Remove stray emacs mode markers in all these files that was causing emacs to
...
open them in fundamental-mode instead of c++-mode.
Also twiddle whitespace for consistency in ToolChains.cpp.
llvm-svn: 122646
2010-12-31 17:31:54 +00:00
Axel Naumann
b151c3c2d6
Declare argv parameters as const char* const* instead of to char** to clarify that they are not modified, and to allow for string literals as arguments.
...
llvm-svn: 116200
2010-10-11 09:18:43 +00:00
Daniel Dunbar
568b7500fe
Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to
...
GCC.
- Mark -Xclang and -mlinker-version= with it for now, although I am sure there
are more.
llvm-svn: 111005
2010-08-13 04:44:20 +00:00
Daniel Dunbar
7c995e8fac
Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!
...
llvm-svn: 106113
2010-06-16 16:59:23 +00:00
Daniel Dunbar
7c9e4306af
Driver: Change OptTable::ParseArg to take any ArgList.
...
llvm-svn: 105839
2010-06-11 22:00:17 +00:00
Daniel Dunbar
35cbfeba8f
Driver: Eliminate Arg subclasses, which are now unnecessary.
...
llvm-svn: 105762
2010-06-09 22:31:08 +00:00
Daniel Dunbar
8b77f73314
Driver: Keep the rendering style in the option, instead of as part of the Arg.
...
llvm-svn: 105761
2010-06-09 22:31:04 +00:00
Daniel Dunbar
8f1ebabaf7
Driver: Change Arg to just hold the values directly, instead of implicitly
...
deriving them from the Arg type.
llvm-svn: 105760
2010-06-09 22:31:00 +00:00
Daniel Dunbar
4ea3aea534
Driver: Allow Render{Separate,Joined} option flags on JoinedOrSeparate option types.
...
Also, simplify/fix SeparateArg::render with forced join.
llvm-svn: 99022
2010-03-20 01:12:00 +00:00
Daniel Dunbar
78e9de56f4
OptTable: Allow option groups to be used to define "help groups", which will
...
collate the options inside that group.
llvm-svn: 90592
2009-12-04 21:08:40 +00:00
Daniel Dunbar
250bd17374
OptParser: Add HelpHidden flag.
...
llvm-svn: 90591
2009-12-04 21:08:25 +00:00
Daniel Dunbar
65b9952c2e
Add OptTable::PrintHelp.
...
llvm-svn: 90420
2009-12-03 07:01:38 +00:00
Daniel Dunbar
52ed5feee5
Factor out OptTable::ParseArgs, for parsing an entire argument vector.
...
llvm-svn: 89327
2009-11-19 06:35:06 +00:00
Daniel Dunbar
b323fd72ab
Driver: Take option ID for {Input,Unknown}Option, to drop dependency on actual options.
...
llvm-svn: 89312
2009-11-19 04:25:06 +00:00
Daniel Dunbar
8c00957008
Driver: Introduce OptSpecifier class for protecting access to an option id.
...
llvm-svn: 89310
2009-11-19 04:14:53 +00:00
Daniel Dunbar
aa767378ac
Driver: Split OptTable out into OptTable.{h,cpp}
...
llvm-svn: 89283
2009-11-19 00:15:11 +00:00
Daniel Dunbar
7147de2c4e
Make MSVC happy.
...
llvm-svn: 89247
2009-11-18 21:42:57 +00:00
Daniel Dunbar
26228a0d7a
Driver: Rework OptTable to have no dependency on the options it manages.
...
llvm-svn: 89234
2009-11-18 20:19:36 +00:00
Daniel Dunbar
21432d38a0
Driver: Switch Options.def to storing flags as a bitmask (instead of mangled
...
into a string).
llvm-svn: 89212
2009-11-18 17:42:34 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Daniel Dunbar
9ab53d2b17
Explicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bug
...
in array value-initialization.
llvm-svn: 75518
2009-07-13 21:50:47 +00:00
Daniel Dunbar
a3cfbe33da
Driver: Add 'q' flag for options which shouldn't be reported as unused.
...
- <rdar://problem/6756295> warning about '-dynamic' argument unused
during compilation seems incorrect
llvm-svn: 68535
2009-04-07 19:04:18 +00:00
Daniel Dunbar
b2a7c062aa
Driver: Fix a parsing bug where some options were matched
...
incorrectly. I'm blanking on the smartest way to write this search,
but we should just do the right thing when we move to TableGen.
- <rdar://problem/6761194> [driver] -Wextra-tokens isn't parsed
correctly
llvm-svn: 68525
2009-04-07 18:21:47 +00:00
Daniel Dunbar
77684ead4b
Driver: Add OptTable::getOptionKind.
...
Also, removed default value for getOptionMetaVar.
llvm-svn: 68146
2009-03-31 21:26:12 +00:00
Daniel Dunbar
a207254f94
Driver: Add extra parameters for help text to option definitions.
...
- Currently unused.
And yes, now may be about the time I want a TableGen backend.
llvm-svn: 68139
2009-03-31 20:12:05 +00:00
Daniel Dunbar
0e378b1e26
Driver: Replace Option::ForwardToGCC by Option::DriverOption (which
...
matches the flag in Options.def).
llvm-svn: 67679
2009-03-25 06:08:46 +00:00
Daniel Dunbar
dac54a81df
Driver: Prep for tool chain specific argument translation.
...
- Lift ArgList to a base class for InputArgList and DerivedArgList.
- This is not a great decomposition, but it does embed the
translation into the type system, and keep things efficient for
tool chains that don't want to do any translation.
- No intended functionality change.
Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).
llvm-svn: 67676
2009-03-25 04:13:45 +00:00
Daniel Dunbar
0e0cf39a9e
gcc 4.3 finds my use of ^ suspicious.
...
llvm-svn: 67673
2009-03-25 03:06:26 +00:00
Daniel Dunbar
95953ce31c
Driver: Make argument parsing fast.
...
On a synthetic command line consisting of almost all defined options,
this drops wall time from .00494 to .00336 and user time from .00258
to .00105.
On the same benchmark, clang-driver is about 15% faster than the
primary gcc driver and almost twice as fast as the gcc driver driver.
llvm-svn: 67564
2009-03-23 21:50:40 +00:00
Daniel Dunbar
ee4d1feb44
Driver: Fix off by one in computation of first searchable option.
...
llvm-svn: 67552
2009-03-23 19:19:19 +00:00
Daniel Dunbar
453d79a2db
Driver: Check that options are ordered properly (outside of
...
Release-Asserts mode).
Also, avoid searching through option groups (which will never match).
llvm-svn: 67548
2009-03-23 18:41:45 +00:00
Daniel Dunbar
d8500f3b0f
Driver: Implement 'missing argument' error.
...
llvm-svn: 67490
2009-03-22 23:26:43 +00:00
Daniel Dunbar
4b6058e33a
Driver: Add "d" flag to Options.def for options which are completely
...
handled by driver.
- This is not very precise, we use it to drive the "forward-to-gcc"
predicate, when trying to talk to a generic gcc tool.
- Slightly better than what ccc was doing, and should be good
enough. Platforms which want a robust driver should implement a
proper tool chain.
llvm-svn: 67181
2009-03-18 08:01:15 +00:00
Daniel Dunbar
92c2af76c4
Driver: Value initialization is nicer than memset.
...
- Who wouldn't want correctness to hang critically on two easily
ignored characters?
Thanks Doug!
llvm-svn: 66819
2009-03-12 18:42:02 +00:00
Daniel Dunbar
57fc0194a8
Driver: Drop some unnecessary uses of clang namespace.
...
llvm-svn: 66813
2009-03-12 18:31:08 +00:00
Daniel Dunbar
d971762d5a
Driver: '-' is parsed as an input.
...
llvm-svn: 66784
2009-03-12 08:44:47 +00:00
Daniel Dunbar
6d3d46bbeb
Driver: Add Option flags.
...
llvm-svn: 66774
2009-03-12 05:46:32 +00:00
Daniel Dunbar
c727e9310d
Driver: Tweak option naming/def:
...
- Use OPT_ prefix for ids.
- Reference groups and aliases by shortend id (on the theory that
this is more readable).
- Rename the special option ids to more protected names.
llvm-svn: 66767
2009-03-12 03:42:54 +00:00
Daniel Dunbar
71dc375142
Driver: Reorder arguments in Options.def so option name is first.
...
llvm-svn: 66759
2009-03-12 01:46:53 +00:00
Daniel Dunbar
458b6982d4
Driver: Implement Option::accept methods.
...
llvm-svn: 66106
2009-03-04 23:22:02 +00:00
Daniel Dunbar
b7396f10b9
Driver: Fix off by one in ParseOneArg; this code is ugly but will be
...
replaced anyway.
llvm-svn: 66101
2009-03-04 23:03:35 +00:00
Daniel Dunbar
d9621da5ae
Driver: Add OptTable::ParseOneArg.
...
llvm-svn: 66090
2009-03-04 22:41:37 +00:00
Daniel Dunbar
a59194cd10
Driver: Option's need to know their ID.
...
- Also, add Input and Unknown opts to OptTable.
llvm-svn: 66079
2009-03-04 21:53:04 +00:00
Daniel Dunbar
f49bc318ed
Driver: Add Option flags.
...
llvm-svn: 66067
2009-03-04 21:05:23 +00:00
Daniel Dunbar
5637208a88
Driver: More Option implementation.
...
- Add Options.def file, collects option information.
- Actual option instantiation is handled lazily by OptTable to allow
the driver to not need to instantiate all options.
- cast<> support for Option, other minor tweaks.
llvm-svn: 66028
2009-03-04 08:33:23 +00:00