aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/OptTable.cpp
AgeCommit message (Collapse)Author
2009-04-07Driver: Add 'q' flag for options which shouldn't be reported as unused.Daniel Dunbar
- <rdar://problem/6756295> warning about '-dynamic' argument unused during compilation seems incorrect git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07Driver: Fix a parsing bug where some options were matchedDaniel Dunbar
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31Driver: Add OptTable::getOptionKind.Daniel Dunbar
Also, removed default value for getOptionMetaVar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31Driver: Add extra parameters for help text to option definitions.Daniel Dunbar
- Currently unused. And yes, now may be about the time I want a TableGen backend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25Driver: Replace Option::ForwardToGCC by Option::DriverOption (whichDaniel Dunbar
matches the flag in Options.def). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25Driver: Prep for tool chain specific argument translation.Daniel Dunbar
- 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25gcc 4.3 finds my use of ^ suspicious.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67673 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-23Driver: Make argument parsing fast.Daniel Dunbar
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67564 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-23Driver: Fix off by one in computation of first searchable option.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-23Driver: Check that options are ordered properly (outside ofDaniel Dunbar
Release-Asserts mode). Also, avoid searching through option groups (which will never match). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67548 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22Driver: Implement 'missing argument' error.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18Driver: Add "d" flag to Options.def for options which are completelyDaniel Dunbar
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12Driver: Value initialization is nicer than memset.Daniel Dunbar
- Who wouldn't want correctness to hang critically on two easily ignored characters? Thanks Doug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12Driver: Drop some unnecessary uses of clang namespace.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12Driver: '-' is parsed as an input.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12Driver: Add Option flags.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12Driver: Tweak option naming/def:Daniel Dunbar
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12Driver: Reorder arguments in Options.def so option name is first.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66759 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04Driver: Implement Option::accept methods.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04Driver: Fix off by one in ParseOneArg; this code is ugly but will beDaniel Dunbar
replaced anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04Driver: Add OptTable::ParseOneArg.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04Driver: Option's need to know their ID.Daniel Dunbar
- Also, add Input and Unknown opts to OptTable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04Driver: Add Option flags.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04Driver: More Option implementation.Daniel Dunbar
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66028 91177308-0d34-0410-b5e6-96231b3b80d8