summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ArgList.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+0
| | | | | | | | | | | | | 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
* Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith2012-11-011-6/+6
| | | | llvm-svn: 167211
* [Options] Add prefixes to options.Michael J. Spencer2012-10-221-4/+11
| | | | | | | | | | | | | | 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
* [Options] make Option a value type.Michael J. Spencer2012-10-191-8/+8
| | | | llvm-svn: 166347
* Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.Argyrios Kyrtzidis2012-10-181-8/+8
| | | | | | This seems to have introduced assertion hit when building compiler-rt. llvm-svn: 166245
* [Options] make Option a value type.Michael J. Spencer2012-10-181-8/+8
| | | | llvm-svn: 166223
* Revert "[Options] make Option a value type."Eric Christopher2012-10-101-8/+8
| | | | | | | | | | | | | 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
* [Options] make Option a value type.Michael J. Spencer2012-10-101-8/+8
| | | | llvm-svn: 165663
* Factor out the code retrieves the last PIC related argument fromSimon Atanasyan2012-05-291-0/+62
| | | | | | | the Clang::ConstructJob() to the new ArgList::getLastArg() routine with eight argument. That simplifies reusing of this code. llvm-svn: 157633
* [driver] Parse diagnostic args in the driver.Chad Rosier2012-03-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Previously, only diagnostics thrown by the cc1 process were actually honoring the diagnostic options given on the command line, like -Werror. Reuse the existing code in Frontend currently used for cc1, adjusting it to not interpret -Wl, linker flags as warnings. Also fix a faulty test exposed by this change. It wasn't actually testing anything, and was giving this warning: clang-3: warning: argument unused during compilation: '-verify' Which -Werror didn't turn into an error because it was output by the driver, not the cc1 process, and diagnostic options weren't parsed by the driver. And you couldn't see the warning when running the test suite. Fixes PR12181. Patch by Dylan Noblesmith <nobled@dreamwidth.org>. llvm-svn: 152660
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-1/+1
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Fix PR11685 by implementing -ffast-math and its various friends in theChandler Carruth2012-01-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Clang driver. This involves a bunch of silly option parsing code to try to carefully emulate GCC's options. Currently, this takes a conservative approach, and unless all of the unsafe optimizations are enabled, none of them are. The fine grained control doesn't seem particularly useful. If it ever becomes useful, we can add that to LLVM first, and then expose it here. This also fixes a few tiny bugs in the flag management around -fhonor-infinities and -fhonor-nans; the flags now form proper sets both for enabling and disabling, with the last flag winning. I've also implemented a moderately terrifying GCC feature where a language change is also provided by the '-ffast-math' flag by defining the __FAST_MATH__ preprocessor macro. This feature is tracked and serialized in the frontend but it isn't used yet. A subsequent patch will add the preprocessor macro and tests for it. I've manually tested that codegen appears to respect this, but I've not dug in enough to see if there is an easy way to test codegen options w/o relying on the particulars of LLVM's optimizations. llvm-svn: 147434
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-1/+1
| | | | llvm-svn: 140478
* Fix else style. No functionality change intended.Chad Rosier2011-08-171-1/+2
| | | | llvm-svn: 137896
* [driver] Make sure to update the iterator end when erasing for Args.Chad Rosier2011-08-121-2/+2
| | | | llvm-svn: 137539
* Improved efficiency by using iterator returned by erase, rather then restarting.Chad Rosier2011-08-081-4/+4
| | | | | | Thanks to David Blaikie for pointing this out. llvm-svn: 137051
* When the compiler crashes, the compiler driver now produces diagnostic Chad Rosier2011-08-021-0/+16
| | | | | | | | | information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. rdar://9575623 llvm-svn: 136702
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-17/+17
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Temporarily revert r135614 while I fix the cmake build.Chad Rosier2011-07-201-16/+0
| | | | llvm-svn: 135621
* When the compiler crashes, the compiler driver now produces diagnostic ↵Chad Rosier2011-07-201-0/+16
| | | | | | | | | information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. llvm-svn: 135614
* StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!Douglas Gregor2011-07-051-2/+2
| | | | llvm-svn: 134418
* Remove stray emacs mode markers in all these files that was causing emacs toNick Lewycky2010-12-311-1/+1
| | | | | | | open them in fundamental-mode instead of c++-mode. Also twiddle whitespace for consistency in ToolChains.cpp. llvm-svn: 122646
* Fix PR8639 by making the "argument unused during compilation" less ↵Rafael Espindola2010-12-201-19/+16
| | | | | | | | agressive. Now we don't warn if an argument is not used because it is shadowed by a subsequent argument. llvm-svn: 122281
* Declare argv parameters as const char* const* instead of to char** to ↵Axel Naumann2010-10-111-1/+2
| | | | | | clarify that they are not modified, and to allow for string literals as arguments. llvm-svn: 116200
* Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friendsDaniel Dunbar2010-07-131-0/+19
| | | | | | are explicitly given. llvm-svn: 108297
* Driver: Fix refacto in DerivedArgList::MakeSeparateArg.Daniel Dunbar2010-06-141-25/+16
| | | | llvm-svn: 105958
* Driver: Add an explicit argument translation phase to the driver itself. We ↵Daniel Dunbar2010-06-111-3/+1
| | | | | | are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect. llvm-svn: 105842
* Driver: Get rid of the proxy support in DerivedArgList.Daniel Dunbar2010-06-111-5/+6
| | | | llvm-svn: 105841
* Driver: Fix arg_iterator typing to reflect that it is really an iterator ↵Daniel Dunbar2010-06-111-9/+9
| | | | | | over Arg*s. llvm-svn: 105838
* Driver: Eliminate Arg subclasses, which are now unnecessary.Daniel Dunbar2010-06-091-6/+6
| | | | llvm-svn: 105762
* Driver: Change Arg to just hold the values directly, instead of implicitlyDaniel Dunbar2010-06-091-5/+8
| | | | | | deriving them from the Arg type. llvm-svn: 105760
* Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so thatDaniel Dunbar2010-06-091-1/+12
| | | | | | they can be independent of the exact option that created them. llvm-svn: 105739
* Attempt to make MSVC happy.Daniel Dunbar2010-05-221-1/+1
| | | | llvm-svn: 104432
* Try to fix MSVC build.Benjamin Kramer2010-05-211-0/+1
| | | | llvm-svn: 104371
* Driver: Move some argument lookup utilities into driver::ArgList.Daniel Dunbar2010-05-201-0/+27
| | | | llvm-svn: 104237
* Driver: Free synthesized derived arguments.Daniel Dunbar2010-03-111-7/+14
| | | | llvm-svn: 98262
* Fix -Wsign-compare warnings reported by clang++.Ted Kremenek2010-03-101-3/+3
| | | | llvm-svn: 98174
* Add an arg_iterator, for iterating over a subset of arguments in an ArgList.Daniel Dunbar2009-11-251-72/+40
| | | | llvm-svn: 89860
* Driver: Introduce OptSpecifier class for protecting access to an option id.Daniel Dunbar2009-11-191-17/+17
| | | | llvm-svn: 89310
* Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead ↵Daniel Dunbar2009-11-191-16/+19
| | | | | | | | of taking a Claim argument. - Most driver code always claims, and bool arguments don't play nice with the overloads. llvm-svn: 89308
* StringRefize ArgList construction of ArgStrings.Daniel Dunbar2009-09-091-8/+18
| | | | llvm-svn: 81385
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-16/+14
| | | | llvm-svn: 81346
* Add stack protector support to clang. This generates the 'ssp' and 'sspreq'Bill Wendling2009-06-281-0/+29
| | | | | | | | function attributes. There are predefined macros that are defined when stack protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with -fstack-protector-all. llvm-svn: 74405
* Add option for AddAllArgsTranslated to control whether output argumentDaniel Dunbar2009-04-261-3/+11
| | | | | | should be joined or separate. llvm-svn: 70101
* Driver: Add default for ArgList::hasFlag and simplify implementation.Daniel Dunbar2009-04-071-6/+2
| | | | llvm-svn: 68549
* Driver: Explicitly ignore -fpch-preprocess when using clang, we don'tDaniel Dunbar2009-04-031-0/+9
| | | | | | need to do anything special to support this. llvm-svn: 68403
* Driver: Unbreak ArgList::hasFlag.Daniel Dunbar2009-03-301-1/+1
| | | | | | | - <rdar://problem/6726511> [driver] clang does not have -msoft-float hooked up. llvm-svn: 68044
* Driver: Track which original arguments an arg is derived from, so thatDaniel Dunbar2009-03-291-8/+9
| | | | | | | we can properly claim arguments, even if they have been translated by the tool chain. llvm-svn: 68020
* Driver: Add ArgList::AddAllArgsTranslated; for forwarding options toDaniel Dunbar2009-03-261-0/+13
| | | | | | | tools with the name of the option replace, and arguments rendered separately. llvm-svn: 67753
* Driver: Prep for tool chain specific argument translation.Daniel Dunbar2009-03-251-50/+78
| | | | | | | | | | | | | | | | - 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
OpenPOWER on IntegriCloud