summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-201-1/+1
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
* We want the dwarf AT_producer for assembly source files to match clang'sKevin Enderby2013-01-171-0/+4
| | | | | | | | | | | | | | | | AT_producer. Which includes clang's version information so we can tell which version of the compiler was used. This is second of the two steps to allow us to do this. The first was a change to llvm-mc with revision 172630 to provide a method to set the AT_producer string. This second step has the clang driver passing the value of getClangFullVersion() via the new flag -dwarf-debug-producer when invoking the integrated assembler on assembly source files. Then using the new setDwarfDebugProducer() method to set the AT_producer string. rdar://12888242 llvm-svn: 172758
* [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
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-021-1/+1
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
* 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
* Add support for passing the main file name down to the assemblerEric Christopher2012-12-181-0/+4
| | | | | | | | for location information. Part of PR14624 llvm-svn: 170391
* Fix PR14625 by teaching the driver to detect PWD for assembly files.Chandler Carruth2012-12-171-0/+4
| | | | | | | | | | | | | | This also requires adding support to -cc1as for passing the detecting PWD down through LLVM's debug info (which in turn required the LLVM change in r170371). The test case is weak (we only test the driver behavior) because there is currently to infrastructure for running cc1as in the test suite. So those four lines are untested (much like all other lines in that file), but we have a test for the same pattern using llvm-mc in the LLVM repository. llvm-svn: 170373
* Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the userRoman Divacky2012-12-131-6/+16
| | | | | | | | | | specifies not to. Dont build ASTMatchers with Rewriter disabled and StaticAnalyzer when it's disabled. Without all those three, the clang binary shrinks (x86_64) from ~36MB to ~32MB (unstripped). llvm-svn: 170135
* Sort #include lines for tools/...Chandler Carruth2012-12-043-20/+19
| | | | | | 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-272-11/+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-122-4/+7
| | | | | | | | defined as an internal software error. This notifies the driver to report diagnostics information. rdar://11951540 llvm-svn: 167754
* If we encounter a fatal error, call the interrupt handler to ensure anyChad Rosier2012-11-121-0/+5
| | | | | | | temporary files are removed. rdar://12282296 llvm-svn: 167741
* Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith2012-11-011-2/+2
| | | | llvm-svn: 167211
* Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untestedRichard Smith2012-11-011-77/+0
| | | | | | | and apparently unused (and since they are untested, they're presumably also broken). llvm-svn: 167210
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-233-12/+16
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Move TargetData to DataLayout.Micah Villmow2012-10-081-1/+1
| | | | llvm-svn: 165395
* Follow up on llvm r164132.Roman Divacky2012-09-181-2/+2
| | | | llvm-svn: 164133
* 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
* Tweak link order to hopefully resolve a buildbot failure.Ted Kremenek2012-09-011-1/+1
| | | | llvm-svn: 163052
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-012-2/+4
| | | | | | | This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. llvm-svn: 163050
* CMake: clang should depend on clang-headers, or bin/clang would not work better.NAKAMURA Takumi2012-07-201-0/+2
| | | | llvm-svn: 160549
* [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
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-19/+19
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* Fix a big layering violation introduced by r158771.Chandler Carruth2012-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | That commit added a new library just to hold the RawCommentList. I've started a discussion on the commit thread about whether that is really meritted -- it certainly doesn't seem necessary at this stage. However, the immediate problem is that the AST library has a hard dependency on the Comment library, but the dependencies were set up completely backward. In addition to the layering violation, this had an unfortunate effect if scattering the Comments library dependency throughout the build system, but inconsistently so -- several parts of the CMake dependencies were missing and only showed up due to transitive deps or the fact that the target wasn't being built by tho bots. It turns out that the Comments library can't (currently) be a well formed layer *below* the AST library either, as it has an API that accepts an ASTContext. That parameter is currently unused, so maybe that was a mistake? Anyways, it really seems like this is logically part of the AST -- that's the whole point of the ASTContext providing access to it as far as I can tell -- so I've merged it into the AST library to solve the immediate layering violation problems and remove some of the churn from our library dependencies. llvm-svn: 158807
* Fix cmake build.Rafael Espindola2012-06-201-1/+0
| | | | llvm-svn: 158782
* Structured comment parsing, first step.Dmitri Gribenko2012-06-202-1/+2
| | | | | | | | | * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang llvm-svn: 158771
* Allow MCCodeEmitter access to the target MCRegisterInfo.Jim Grosbach2012-05-151-2/+2
| | | | | | Add MRI to the createMCCodeEmitter() call. llvm-svn: 156830
* Unify Options.td and CC1Options.td, in a first step towards unifying the ↵James Molloy2012-05-012-4/+4
| | | | | | | | 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
* Kill the last vestiges of clangIndexDouglas Gregor2012-04-132-2/+1
| | | | llvm-svn: 154675
* Fix build by passing in the needed variable after r153860.Bill Wendling2012-04-021-1/+2
| | | | llvm-svn: 153861
* [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
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-062-1/+3
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
* Add MCRegisterInfo to the MCInstPrinter factory function interface.Jim Grosbach2012-03-051-1/+1
| | | | llvm-svn: 152046
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-203-3/+3
| | | | | | | 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-133-4/+4
| | | | | | More cleanup after r149798. llvm-svn: 150379
* Have the driver pass CPU and target feature information to cc1as.Jim Grosbach2012-02-101-4/+25
| | | | | | | | | | When creating the MCSubtargetInfo, the assembler driver uses the CPU and feature string to construct a more accurate model of what instructions are and are not legal. rdar://10840476 llvm-svn: 150273
* cmake: create a relative symlink to clang, not absoluteDylan Noblesmith2012-02-091-3/+4
| | | | | | | Hardcoding the location of the build directory seems like it would break at `make install`/packaging time. llvm-svn: 150201
* Make use of const-correct ParseCommandLineOptionsDavid Blaikie2012-02-071-1/+1
| | | | llvm-svn: 150000
* Pass the SourceMgr to the MCContext for cc1as.Jim Grosbach2012-02-021-1/+1
| | | | llvm-svn: 149608
* [driver] Do emit the diagnostics when CompilerInvocation::CreateFromArgs() ↵Argyrios Kyrtzidis2012-01-251-2/+2
| | | | | | fails. llvm-svn: 148970
* 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
* driver: fix unused variable warningDylan Noblesmith2011-12-261-1/+1
| | | | | | from r147218. llvm-svn: 147278
OpenPOWER on IntegriCloud