Chandler Carruth
3a02247dc9
Sort all of Clang's files under 'lib', and fix up the broken headers
...
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
2012-12-04 09:13:33 +00:00
Argyrios Kyrtzidis
7ec3c09412
[options] Fix mishandling of aliased options that was introduced in r166444.
...
llvm-svn: 166801
2012-10-26 19:36:33 +00:00
Michael J. Spencer
929fccd476
[Options] Add prefixes to options.
...
Each option has a set of prefixes. When matching an argument such as
-funroll-loops. First the leading - is removed as it is a prefix. Then
a lower_bound search for "funroll-loops" is done against the option table by
option name. From there each option prefix + option name combination is tested
against the argument.
This allows us to support Microsoft style options where both / and - are valid
prefixes. It also simplifies the cases we already have where options come in
both - and -- forms. Almost every option for gnu-ld happens to have this form.
llvm-svn: 166444
2012-10-22 22:13:48 +00:00
Benjamin Kramer
a18228a95f
Silence warning about && in ||.
...
llvm-svn: 166391
2012-10-21 15:21:56 +00:00
Michael J. Spencer
fc790901d2
[Options] make Option a value type.
...
llvm-svn: 166347
2012-10-19 22:36:40 +00:00
Argyrios Kyrtzidis
f552d3841b
Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.
...
This seems to have introduced assertion hit when building compiler-rt.
llvm-svn: 166245
2012-10-18 22:42:31 +00:00
Michael J. Spencer
842227a2e2
[Options] make Option a value type.
...
llvm-svn: 166223
2012-10-18 20:33:42 +00:00
Eric Christopher
12de2bdfc5
Revert "[Options] make Option a value type."
...
Author: Michael J. Spencer <bigcheesegs@gmail.com>
Date: Wed Oct 10 21:48:26 2012 +0000
[Options] make Option a value type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165663 91177308-0d34-0410-b5e6-96231b3b80d8
This reverts commit 0464fd5e4ce2193e786e5adcab6b828f9366dae3.
llvm-svn: 165667
2012-10-10 22:34:46 +00:00
Michael J. Spencer
91599874e9
[Options] make Option a value type.
...
llvm-svn: 165663
2012-10-10 21:48:26 +00:00
Michael J. Spencer
bfdde7cb60
[Options] Store the owning OptTable in Option so it can construct Group and Alias.
...
llvm-svn: 165150
2012-10-03 19:58:10 +00:00
Sylvestre Ledru
33b5baf189
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766
...
llvm-svn: 164769
2012-09-27 10:16:10 +00:00
Sylvestre Ledru
a876013dc9
Fix a typo 'iff' => 'if'
...
llvm-svn: 164766
2012-09-27 09:57:10 +00:00
Michael J. Spencer
9d1221a281
[Options] Store the option ID in OptTable::Info.
...
llvm-svn: 164644
2012-09-25 23:12:48 +00:00
Michael J. Spencer
d492219e59
Reduce the amount of state in the Option class by relying on the data from OptTable::Info.
...
llvm-svn: 162299
2012-08-21 18:51:17 +00:00
David Blaikie
b6b9623952
Fix -Wswitch warning introduced by r162231
...
llvm-svn: 162236
2012-08-20 22:22:51 +00:00
Michael J. Spencer
ad3ccc3cb0
Make Option non virtual.
...
llvm-svn: 162231
2012-08-20 21:41:17 +00:00
David Blaikie
f47fa304a4
Remove unnecessary default cases in switches over enums.
...
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
2012-01-17 02:30:50 +00:00
David Blaikie
aa347f9392
Removing a bunch of dead returns/breaks after llvm_unreachables.
...
llvm-svn: 140407
2011-09-23 20:26:49 +00:00
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
Douglas Gregor
1cb4290b89
StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!
...
llvm-svn: 134418
2011-07-05 16:56:25 +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
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
7c9e4306af
Driver: Change OptTable::ParseArg to take any ArgList.
...
llvm-svn: 105839
2010-06-11 22:00:17 +00:00
Daniel Dunbar
bfe71f2416
Driver: Change Option parsing to always create arguments referring to unaliased
...
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.
llvm-svn: 105763
2010-06-09 22:44:34 +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
c656d3e111
Revert "Driver: Change Option parsing to always create arguments referring to
...
unaliased", this isn't quite right yet.
llvm-svn: 105747
2010-06-09 19:27:07 +00:00
Daniel Dunbar
aea0620b89
Driver: Change Option parsing to always create arguments referring to unaliased
...
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.
llvm-svn: 105744
2010-06-09 19:19:01 +00:00
Daniel Dunbar
26a95c6717
Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
...
they can be independent of the exact option that created them.
llvm-svn: 105739
2010-06-09 18:49:38 +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
b3b47b8dde
Driver: Resolve inconsistency in matching options against options which are
...
aliases -- just treat this case as an (unchecked) client error.
llvm-svn: 89306
2009-11-19 03:26:50 +00:00
Daniel Dunbar
f324fa7095
Driver: Store Option ID field as unsigned to drop dependency on the options
...
type.
llvm-svn: 89232
2009-11-18 20:19:19 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +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
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
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
57fc0194a8
Driver: Drop some unnecessary uses of clang namespace.
...
llvm-svn: 66813
2009-03-12 18:31:08 +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
8fa943436b
Driver: Add Option::getId and Option::matches taking an option
...
identifier; we will want to use the latter in situations where we just
want to check for a match, but not load options unnecessarily.
llvm-svn: 66757
2009-03-12 01:34:20 +00:00
Daniel Dunbar
4095d89532
Remove some now-unneeded calls to llvm::errs().flush().
...
llvm-svn: 66555
2009-03-10 18:00:19 +00:00
Daniel Dunbar
d02cb1dc2b
Driver: Basic argument parsing.
...
- Add Driver::ParseArgStrings.
- Store values directly in CommaJoinedArg to support simple access.
- Add FlagArg class.
llvm-svn: 66142
2009-03-05 06:38:47 +00:00
Daniel Dunbar
458b6982d4
Driver: Implement Option::accept methods.
...
llvm-svn: 66106
2009-03-04 23:22:02 +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