summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver/cc1_main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add a stub frontend action for BoostCon, for next week's workshop.Douglas Gregor2010-05-071-0/+1
| | | | llvm-svn: 103258
* Fix -Wcast-qual warnings.Dan Gohman2010-04-191-1/+1
| | | | llvm-svn: 101786
* Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM ↵Daniel Dunbar2010-04-151-0/+13
| | | | | | | | option parser. - Note that this is a behavior change, previously -mllvm at the driver level forwarded to clang -cc1. The driver does a little magic to make sure that '-mllvm -disable-llvm-optzns' works correctly, but other users will need to be updated to use -Xclang. llvm-svn: 101354
* Fronted: Kill overly specialized RecordLayoutDumper, just make ↵Daniel Dunbar2010-04-081-1/+0
| | | | | | -dump-record-layouts a bit that Sema honors. llvm-svn: 100747
* update for api change.Chris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100718
* reduce indentation, tidy.Chris Lattner2010-04-061-1/+1
| | | | llvm-svn: 100537
* inline in MC assembly parsers. clang -integrated-as nowChris Lattner2010-04-051-0/+1
| | | | | | works with inline asm! llvm-svn: 100493
* Teach Clang's -cc1 option -print-stats to print LLVM statistics.Douglas Gregor2010-03-301-0/+3
| | | | llvm-svn: 99894
* make -ftime-report work even in -disable-free mode. Woo, finally.Chris Lattner2010-03-301-0/+5
| | | | | | rdar://7781603 llvm-svn: 99878
* Frontend: Don't free the CompilerInstance or FrontendActions when running underDaniel Dunbar2010-03-231-18/+27
| | | | | | | | -disable-free. Among other things, this fixes freeing of the LLVM module on exit. - Note that this means we are disable-free'ing of a lot more stuff than we used to -- this should flush out bugs in anything left that is trying to do real work in its destructor. I did a mini-audit but '::~' is not totally uncommon. llvm-svn: 99258
* clang -cc1: Kill off -empty-input only, and replace with -init-only which is anDaniel Dunbar2010-03-191-0/+1
| | | | | | | | actual action. - This is easier to use, and more reliable for timing the thing this was actually meant to be useful for. llvm-svn: 98978
* Frontend: Pull CodeGenAction out more, and eliminate CreateBackendConsumer.Daniel Dunbar2010-02-251-0/+1
| | | | | | | | | | This is the way I would like to move the frontend function towards -- distinct pieces of functionality should be exposed only via FrontendAction implementations which have clean and relatively-stable APIs. This also isolates the surface area in clang which depends on LLVM CodeGen. llvm-svn: 97110
* Remove unused includes.Daniel Dunbar2010-02-211-2/+0
| | | | llvm-svn: 96760
* CompilerInstance: Move LLVMContext member out of constructor.Daniel Dunbar2010-02-161-1/+3
| | | | llvm-svn: 96314
* Switch clang to use its own LLVMContext (not the global one).Daniel Dunbar2010-02-161-1/+1
| | | | llvm-svn: 96313
* Introduce a testbed for merging multiple ASTs into a single ASTDouglas Gregor2010-02-091-1/+16
| | | | | | | context with the AST importer. WIP, still useless but at least it has a test. llvm-svn: 95683
* clang -cc1: Wire up -emit-obj, for emitting object files.Daniel Dunbar2010-02-031-0/+1
| | | | llvm-svn: 95182
* cc1: Factor out CompilerInstance::ExecuteAction which has the majority of theDaniel Dunbar2010-01-131-87/+13
| | | | | | | | clang -cc1 logic for running an action against a set of options. - This should make it easier to build tools that have a clang -cc1 like interface, but aren't actually part of clang -cc1. llvm-svn: 93282
* cc1: Lift creation of the FrontendAction higher.Daniel Dunbar2010-01-131-7/+6
| | | | llvm-svn: 93281
* Remove RewriteBlocks. It has been superseded by RewriteObjCKovarththanan Rajaratnam2009-12-231-1/+0
| | | | llvm-svn: 92014
* Fix pretty stack traces.Daniel Dunbar2009-12-161-2/+0
| | | | llvm-svn: 91537
* Add -resource-dir to clang -cc1, this allows the base directory for compilerDaniel Dunbar2009-12-151-3/+3
| | | | | | | resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of computed. llvm-svn: 91370
* CompilerInvocation: Move builtin-include-path logic out of ↵Daniel Dunbar2009-12-131-9/+12
| | | | | | CompilerInvocation::CreateFromArgs. llvm-svn: 91237
* Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gaveJeffrey Yasskin2009-12-121-1/+1
| | | | | | no extra safety anyway. llvm-svn: 91207
* Implement clang -cc1.Daniel Dunbar2009-12-111-3/+313
| | | | | | - I apologize for the link time horrors, my goal is to kill off clang-cc in fairly short order. llvm-svn: 91170
* Put CompilerInvocation testing code in clang-cc instead of clang for now, I ↵Daniel Dunbar2009-11-301-68/+1
| | | | | | | | can't bear to link all of clang into 'clang' yet. :) - Still triggered by a magic leading -cc1 argument, as before. llvm-svn: 90114
* Change CompilerInvocation::CreateFromArgs to report errors using a proper ↵Daniel Dunbar2009-11-291-2/+3
| | | | | | | | diagnostic engine. - Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later. llvm-svn: 90092
* Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of ↵Daniel Dunbar2009-11-291-3/+5
| | | | | | main (or something in the main executable) so it can find the builtin compiler files. llvm-svn: 90090
* Switch CompilerInvocation::CreateFromArgs to take const char** arguments ↵Daniel Dunbar2009-11-201-5/+5
| | | | | | until Driver itself switches to StringRef. llvm-svn: 89503
* Fix some default in the option classes, and some CompilerInvocation argificationDaniel Dunbar2009-11-191-4/+4
| | | | | | errors. llvm-svn: 89388
OpenPOWER on IntegriCloud