aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Arg.cpp
AgeCommit message (Collapse)Author
2012-11-01Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167211 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-22[Options] Add prefixes to options.Michael J. Spencer
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166444 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-19[Options] make Option a value type.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166347 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.Argyrios Kyrtzidis
This seems to have introduced assertion hit when building compiler-rt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166245 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18[Options] make Option a value type.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166223 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10Revert "[Options] make Option a value type."Eric Christopher
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165667 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10[Options] make Option a value type.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165663 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05Basic: import SmallString<> into clang namespaceDylan Noblesmith
(I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-05StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134418 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-31Remove stray emacs mode markers in all these files that was causing emacs toNick Lewycky
open them in fundamental-mode instead of c++-mode. Also twiddle whitespace for consistency in ToolChains.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09Driver: Eliminate Arg subclasses, which are now unnecessary.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105762 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09Driver: Keep the rendering style in the option, instead of as part of the Arg.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09Driver: Change Arg to just hold the values directly, instead of implicitlyDaniel Dunbar
deriving them from the Arg type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105760 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so thatDaniel Dunbar
they can be independent of the exact option that created them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09Driver: Change Arg::render methods to use option name instead of string whereDaniel Dunbar
possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105738 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-20Driver: Allow Render{Separate,Joined} option flags on JoinedOrSeparate ↵Daniel Dunbar
option types. Also, simplify/fix SeparateArg::render with forced join. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-29Driver: Track which original arguments an arg is derived from, so thatDaniel Dunbar
we can properly claim arguments, even if they have been translated by the tool chain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25Driver: Fix typo in JoinedAndSeparateArg::render.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22Driver: Drop code for checking bounds in SeparateArg::render, thisDaniel Dunbar
situation should never occur now that arguments are parsed correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22fix PR3859: crash with 'cc -V'Nuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20Driver: Add Arg::getAsString and use when dumping arguments toDaniel Dunbar
diagnostics. - This ensures that the whole argument and values are printed, instead of just the option name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19Driver: Add Arg::renderAsInput; this is a messy area and something IDaniel Dunbar
was hoping to clean up in the rewrite, but I don't see it yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67291 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18Driver: Provide Arg::render implementations.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18Driver: Initialize Arg::ClaimedDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18Driver: Implement JoinedAndSeparateArg::getValue and add parsing testDaniel Dunbar
case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67151 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10Remove some now-unneeded calls to llvm::errs().flush().Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-07Fix warnings in build on clang-x86_64-freebsd buildbot.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05Driver: Basic argument parsing.Daniel Dunbar
- Add Driver::ParseArgStrings. - Store values directly in CommaJoinedArg to support simple access. - Add FlagArg class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66142 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: Add Arg::dump and SeparateArg stubs.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04Driver: Stub out Arg implementations.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66088 91177308-0d34-0410-b5e6-96231b3b80d8