summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver/driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-3/+4
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* Update for llvm change.Rafael Espindola2013-06-131-2/+2
| | | | llvm-svn: 183930
* Use the global functions instead of the Program methods.Rafael Espindola2013-06-121-1/+1
| | | | llvm-svn: 183861
* Remove a FIXME that's not planned to be fixed. We only generated crashChad Rosier2013-03-261-3/+0
| | | | | | diagnostics for the first failing command. llvm-svn: 178086
* Driver: do not strip file extensions when printing diagnostics.Benjamin Kramer2013-03-101-1/+1
| | | | | | | | | | Before: clang-3: error: no input files After: clang-3.3: error: no input files This means that we'll also print clang.exe on windows, but I don't see a problem with that. llvm-svn: 176788
* [driver] Handle the processing of the QA_OVERRIDE_GCC3_OPTIONS and CCC_ADD_ARGSChad Rosier2013-02-211-26/+26
| | | | | | | | before the DiagnosticsEngine is instantiated. Otherwise, warning options are not handled correctly. rdar://13254743 llvm-svn: 175779
* Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose2013-02-081-3/+3
| | | | | | | Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. llvm-svn: 174768
* [driver] Refactor the driver so that a failing commands doesn't preventChad Rosier2013-01-291-8/+24
| | | | | | | | | | | subsequent commands from being executed. The diagnostics generation isn't designed for this use case, so add a note to fix this in the very near future. For now, just generated the diagnostics for the first failing command. Part of rdar://12984531 llvm-svn: 173825
* [driver] Warnings for warning options are handled by the frontend. The ↵Chad Rosier2013-01-151-1/+1
| | | | | | | | | | driver needs to process the warning options to setup diagnostic state, but should not be emitting warnings as these would be rudndant with what the frontend emits. rdar://13001556 llvm-svn: 172497
* Produce an actual error before attempting to attach notes to it when bailing outRichard Smith2012-12-251-2/+5
| | | | | | due to FORCE_CLANG_DIAGNOSTICS_CRASH=1. Also add a test for that env var. llvm-svn: 171074
* Sort #include lines for tools/...Chandler Carruth2012-12-041-9/+8
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* Remove some dead code. CLANG_IS_PRODUCTION is now just a build flag andRafael Espindola2012-11-271-6/+1
| | | | | | is not used in any #ifdef. llvm-svn: 168703
* If we encounter a fatal error, exit with status 70. For BSD systems this isChad Rosier2012-11-121-2/+3
| | | | | | | | defined as an internal software error. This notifies the driver to report diagnostics information. rdar://11951540 llvm-svn: 167754
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-231-6/+6
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Just revert r163605 for now. It broke the build and had someChandler Carruth2012-09-111-26/+11
| | | | | | questionable elements to the patch. llvm-svn: 163609
* Select the correct, or, failing that, compatible, dialect when invoked as cc,David Chisnall2012-09-111-11/+26
| | | | | | | c89, c99, and so on. No change to the default dialect when invoked as clang / clang++. llvm-svn: 163605
* [Win32] Rework crash-report since r145389.NAKAMURA Takumi2012-07-171-0/+8
| | | | | | | | | | | - lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions. - test/Driver/crash-report.c: Add REQUIRES:shell for now. FIXME: setenv should work also on Lit.InternalShellRunner. - test/Driver/crash-report.c: Remove XFAIL. Thanks to Chad, To point out the issue. llvm-svn: 160343
* Unify Options.td and CC1Options.td, in a first step towards unifying the ↵James Molloy2012-05-011-2/+2
| | | | | | | | serialization logic in Frontend and Driver. Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/ llvm-svn: 155916
* Add a little hack to emulate a clang crash, so the diagnostics generator can beChad Rosier2012-04-201-0/+4
| | | | | | tested. llvm-svn: 155205
* [driver] Parse diagnostic args in the driver.Chad Rosier2012-03-131-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | 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 IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-201-1/+1
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* drop more llvm:: prefixes on SmallString<>Dylan Noblesmith2012-02-131-1/+1
| | | | | | More cleanup after r149799. llvm-svn: 150380
* drop more llvm:: prefixes on OwningPtr<>Dylan Noblesmith2012-02-131-2/+2
| | | | | | More cleanup after r149798. llvm-svn: 150379
* rename -ccc-host-triple into -targetSebastian Pop2012-01-201-2/+2
| | | | llvm-svn: 148582
* Revert r148138; it's causing test failures.Eli Friedman2012-01-131-2/+2
| | | | llvm-svn: 148141
* rename -ccc-host-triple into -targetSebastian Pop2012-01-131-2/+2
| | | | llvm-svn: 148138
* remove unneeded config.h includesDylan Noblesmith2011-12-221-1/+0
| | | | llvm-svn: 147195
* rename getHostTriple into getDefaultTargetTriple in clangSebastian Pop2011-11-011-1/+1
| | | | llvm-svn: 143503
* Rip out flags for controlling C++ "production mode" separately.Bob Wilson2011-10-041-8/+1
| | | | | | | This is old leftover cruft from the days when C++ was not yet ready for prime time. llvm-svn: 141063
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-1/+1
| | | | llvm-svn: 140478
* Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.Evan Cheng2011-08-241-2/+2
| | | | llvm-svn: 138451
* When the compiler crashes, the compiler driver now produces diagnostic Chad Rosier2011-08-021-2/+8
| | | | | | | | | 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-23/+23
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Temporarily revert r135614 while I fix the cmake build.Chad Rosier2011-07-201-8/+2
| | | | llvm-svn: 135621
* When the compiler crashes, the compiler driver now produces diagnostic ↵Chad Rosier2011-07-201-2/+8
| | | | | | | | | 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
* Slightly improve the code to derive target from program name to notJoerg Sonnenberger2011-07-071-3/+5
| | | | | | fault if no arguments are given. llvm-svn: 134618
* Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to theDaniel Dunbar2011-04-071-0/+5
| | | | | | | existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to transparently capture the compiler diagnostics from a build. llvm-svn: 129082
* switch a few Driver APIs to use llvm::ArrayRef, cleaning up code.Chris Lattner2011-03-231-2/+2
| | | | llvm-svn: 128142
* Refactor program name logic. Extend it to infer the target triple fromJoerg Sonnenberger2011-03-161-18/+83
| | | | | | | | the program name, if it includes it as proper prefix. This makes calling clang with -ccc-host-triple x86_64-linux the same as calling it with the name x86_64-linux-clang. llvm-svn: 127753
* If called as *cpp or *cpp-[^-]*, run only the preprocessor. If noJoerg Sonnenberger2011-03-061-0/+5
| | | | | | | input is specified, use stdin implicitly. Based on a patch from Roman Divacky. llvm-svn: 127137
* clang: Add support for a CC_PRINT_HEADERS environment variable, which mirrorsDaniel Dunbar2011-02-021-0/+5
| | | | | | | CC_PRINT_OPTIONS and can be used to get some out-of-band information on header usage from a build. llvm-svn: 124751
* Add missing <cctype> include, from Joerg SonnenbergerDouglas Gregor2011-01-171-0/+1
| | | | llvm-svn: 123668
* Replace all uses of PathV1::makeAbsolute with PathV2::fs::make_absolute.Michael J. Spencer2010-12-211-12/+16
| | | | llvm-svn: 122340
* Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 ↵Michael J. Spencer2010-12-181-2/+2
| | | | | | equivalents. llvm-svn: 122140
* Replace all uses of PathV1::getLast with PathV2::filename.Michael J. Spencer2010-12-181-3/+3
| | | | llvm-svn: 122117
* MemoryBuffer API update.Michael J. Spencer2010-12-161-4/+2
| | | | llvm-svn: 121956
* Use error_code instead of std::string* for MemoryBuffer.Michael J. Spencer2010-12-091-1/+3
| | | | llvm-svn: 121378
* Merge System into Support.Michael J. Spencer2010-11-291-4/+4
| | | | llvm-svn: 120297
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-181-1/+2
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* Turns out that we may end up calling dladdr on GetExecutablePath, give it ↵Benjamin Kramer2010-10-301-2/+1
| | | | | | external linkage to make sure the lookup works on all platforms. llvm-svn: 117813
OpenPOWER on IntegriCloud