summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver/cc1_main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-171-2/+6
| | | | | | | | | | | | | - introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! llvm-svn: 242499
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-3/+3
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-3/+3
| | | | | | failures. llvm-svn: 241642
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-071-3/+3
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
* Introduce a PCHContainerOperations interface (NFC).Adrian Prantl2015-06-201-1/+3
| | | | | | | | | | | | | | | | A PCHContainerOperations abstract interface provides operations for creating and unwrapping containers for serialized ASTs (precompiled headers and clang modules). The default implementation is RawPCHContainerOperations, which uses a flat file for the output. The main application for this interface will be an ObjectFilePCHContainerOperations implementation that uses LLVM to wrap the module in an ELF/Mach-O/COFF container to store debug info alongside the AST. rdar://problem/20091852 llvm-svn: 240225
* One other BuryPointer of a unique_ptr cleanup.David Blaikie2014-08-291-1/+1
| | | | llvm-svn: 216743
* ArrayRef'izeSean Silva2014-08-151-5/+3
| | | | | | | I've shied away from ArrayRef'izing CompilerInvocation::CreateFromArgs in this commit because that is a less localized change. llvm-svn: 215773
* static link pollySebastian Pop2014-03-141-0/+11
| | | | llvm-svn: 203887
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-1/+1
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-071-1/+1
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Bury leaked pointers in a global array to silence a leak detector in ↵Kostya Serebryany2013-12-271-1/+2
| | | | | | | | | | | | | | | | --disable-free mode Summary: This is an alternative to http://llvm-reviews.chandlerc.com/D2475 suggested by Chandler. Reviewers: chandlerc, rnk, dblaikie CC: cfe-commits, earthdok Differential Revision: http://llvm-reviews.chandlerc.com/D2478 llvm-svn: 198073
* [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 the error handing static functions for r178161.Chad Rosier2013-03-271-4/+5
| | | | | | Part of rdar://13296693 llvm-svn: 178162
* 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
* Sort #include lines for tools/...Chandler Carruth2012-12-041-2/+2
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* If we encounter a fatal error, exit with status 70. For BSD systems this isChad Rosier2012-11-121-2/+4
| | | | | | | | 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 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-231-3/+6
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* 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
* 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 OwningPtr<>Dylan Noblesmith2012-02-131-1/+1
| | | | | | More cleanup after r149798. llvm-svn: 150379
* [driver] Do emit the diagnostics when CompilerInvocation::CreateFromArgs() ↵Argyrios Kyrtzidis2012-01-251-2/+2
| | | | | | fails. llvm-svn: 148970
* Let CompilerInvocation initialization indicate failureDylan Noblesmith2011-12-231-6/+11
| | | | | | | | | This fixes the FIXMEs in ParseAnalyzeArgs. (Also a precursor to moving the analyzer into an AST plugin.) For consistency, do the same with AssemblerInvocation. llvm-svn: 147218
* Add LinkAllPasses to clangTobias Grosser2011-11-011-0/+1
| | | | | | | | This patch ensures that no passes are deleted from clang, such that the loading of plugins does not fail because of passes being unavailable. This increases the size of the clang binary from 43029853 to 43915291 bytes (around 2%). llvm-svn: 143414
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-4/+4
| | | | llvm-svn: 140478
* Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.Evan Cheng2011-08-241-1/+1
| | | | llvm-svn: 138451
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Match LLVM API change.Evan Cheng2011-07-221-3/+1
| | | | llvm-svn: 135813
* Match createTargetMachine API change.Evan Cheng2011-07-191-0/+1
| | | | llvm-svn: 135469
* Match llvm API change.Evan Cheng2011-07-141-0/+1
| | | | llvm-svn: 135220
* cc1 must initialize MC subtarget infos for inline asm parsing. Re-enable ↵Evan Cheng2011-07-091-0/+1
| | | | | | asm-errors.c llvm-svn: 134811
* Fix an obvious typo.Benjamin Kramer2011-02-271-1/+1
| | | | | | GCC -Waddress warns about this but clang doesn't (PR9043). llvm-svn: 126577
* cc1: Fix stats printing by default when using -mllvm -stats.Daniel Dunbar2011-02-261-1/+1
| | | | llvm-svn: 126559
* Re-instate r125819 and r125820 with no functionality changePeter Collingbourne2011-02-191-3/+0
| | | | llvm-svn: 126060
* Revert 125820 and 125819 to fix PR9266.Rafael Espindola2011-02-191-0/+3
| | | | llvm-svn: 126050
* Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenActionPeter Collingbourne2011-02-181-3/+0
| | | | | | | | | This removes the final dependency edge from any lib outside of CodeGen to core. As a result we can, and do, trim the dependency on core from libclang, PrintFunctionNames, the unit tests and c-index-test. While at it, review and trim other unneeded dependencies. llvm-svn: 125820
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-181-3/+4
| | | | | | | | | | | -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
* Move ExecuteCompilerInvocation to a new library FrontendToolPeter Collingbourne2010-08-241-1/+1
| | | | | | | | | | r110903 introduced a dependency from Frontend to every library that declared an Action by introducing Action references that previously resided in the driver in the file ExecuteCompilerInvocation.cpp. This patch moves ExecuteCompilerInvocation to a new library named FrontendTool which is intended to bear these dependencies. llvm-svn: 111873
* Simplify the ownership model for DiagnosticClients, which was reallyDouglas Gregor2010-08-181-5/+5
| | | | | | | convoluted and a bit leaky. Now, the Diagnostic object owns its DiagnosticClient. llvm-svn: 111437
* Call llvm::remove_fatal_error_handler before deallocating objectsDan Gohman2010-08-181-0/+5
| | | | | | which are used by the error handling functions. llvm-svn: 111427
* Frontend: Move the bulk of the cc1_main() processing intoDaniel Dunbar2010-08-121-129/+3
| | | | | | ExecuteCompilerInvocation in libFrontend. llvm-svn: 110903
* clang -cc1: Move real diagnostics client initialization to earlier.Daniel Dunbar2010-08-121-13/+14
| | | | llvm-svn: 110902
* Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance objectDaniel Dunbar2010-08-021-5/+5
| | | | | | | | | | | | for use in reporting diagnostics. - We don't want to use the Action's own CompilerInstance, because that is only initialized during file processing and I like that invariant. Also, if ParseArgs returns false then abandon execution. Also, remove unused PluginASTAction::PrintHelp virtual method. llvm-svn: 110039
* Eliminate the "minimal" and printing parser actions, which only everDouglas Gregor2010-07-261-2/+0
| | | | | | | worked for C anyway. Also kills the -cc1 options -parse-noop and -parse-print-callbacks. llvm-svn: 109392
* Introduce a new lexer function to compute the "preamble" of a file,Douglas Gregor2010-07-201-0/+1
| | | | | | | | | which is the part of the file that contains all of the initial comments, includes, and preprocessor directives that occur before any of the actual code. Added a new -print-preamble cc1 action that is only used for testing. llvm-svn: 108913
* Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy ↵Daniel Dunbar2010-06-161-11/+5
| | | | | | Straszheim! llvm-svn: 106113
* Break Frontend's dependency on Rewrite, Checker and CodeGen in shared ↵Daniel Dunbar2010-06-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | library configuration Currently, all AST consumers are located in the Frontend library, meaning that in a shared library configuration, Frontend has a dependency on Rewrite, Checker and CodeGen. This is suboptimal for clients which only wish to make use of the frontend. CodeGen in particular introduces a large number of unwanted dependencies. This patch breaks the dependency by moving all AST consumers with dependencies on Rewrite, Checker and/or CodeGen to their respective libraries. The patch therefore introduces dependencies in the other direction (i.e. from Rewrite, Checker and CodeGen to Frontend). After applying this patch, Clang builds correctly using CMake and shared libraries ("cmake -DBUILD_SHARED_LIBS=ON"). N.B. This patch includes file renames which are indicated in the patch body. Changes in this revision of the patch: - Fixed some copy-paste mistakes in the header files - Modified certain aspects of the coding to comply with the LLVM Coding Standards llvm-svn: 106010
* Driver/Frontend: Add -emit-codegen-only, for running irgen + codegen but not theDaniel Dunbar2010-05-251-0/+1
| | | | | | .s printer or .o writer. llvm-svn: 104623
* Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts ↵Daniel Dunbar2010-05-201-2/+2
| | | | | | approximately the same interface as 'llvm-mc'. llvm-svn: 104239
OpenPOWER on IntegriCloud