summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Action.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reapply "Change -save-temps to emit unoptimized bitcode files."Bob Wilson2014-12-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | This reapplies r224503 along with a fix for compiling Fortran by having the clang driver invoke gcc (see r224546, where it was reverted). I have added a testcase for that as well. Original commit message: It is often convenient to use -save-temps to collect the intermediate results of a compilation, e.g., when triaging a bug report. Besides the temporary files for preprocessed source and assembly code, this adds the unoptimized bitcode files as well. This adds a new BackendJobAction, which is mostly mechanical, to run after the CompileJobAction. When not using -save-temps, the BackendJobAction is combined into one job with the CompileJobAction, similar to the way the integrated assembler is handled. I've implemented this entirely as a driver change, so under the hood, it is just using -disable-llvm-optzns to get the unoptimized bitcode. Based in part on a patch by Steven Wu. rdar://problem/18909437 llvm-svn: 224688
* Revert "Change -save-temps to emit unoptimized bitcode files."Reid Kleckner2014-12-181-7/+0
| | | | | | | | | | This reverts commit r224503. It broke compilation of fortran through the Clang driver. Previously `clang -c t.f` would invoke `gcc t.f` and `clang -cc1as`, but now it tries to call `clang -cc1 t.f` which fails for obvious reasons. llvm-svn: 224546
* Change -save-temps to emit unoptimized bitcode files.Bob Wilson2014-12-181-0/+7
| | | | | | | | | | | | | | | | | | | It is often convenient to use -save-temps to collect the intermediate results of a compilation, e.g., when triaging a bug report. Besides the temporary files for preprocessed source and assembly code, this adds the unoptimized bitcode files as well. This adds a new BackendJobAction, which is mostly mechanical, to run after the CompileJobAction. When not using -save-temps, the BackendJobAction is combined into one job with the CompileJobAction, similar to the way the integrated assembler is handled. I've implemented this entirely as a driver change, so under the hood, it is just using -disable-llvm-optzns to get the unoptimized bitcode. Based in part on a patch by Steven Wu. rdar://problem/18909437 llvm-svn: 224503
* unique_ptrify Driver Action handlingDavid Blaikie2014-08-291-34/+33
| | | | | | | | | | | | It hits a limit when we reach ActionList, which is used for dynamic conditional ownership, so we lose type safety there. This did expose at least one caller "lying" about ownership (passing ownership to an Action, then updating the Action to specify that it doesn't actually own the thing that was passed) - changing this to unique_ptr just makes that oddity more obvious. llvm-svn: 216713
* Move -verify-pch to use VerifyJobActionBen Langmuir2014-02-061-3/+27
| | | | | | | | | Use the verify hook rather than the compile hook to represent the -verify-pch action, and move the exising --verify-debug-info action into its own subclass of VerifyJobAction. Incidentally change the name printed by -ccc-print-phases for --verify-debug-info. llvm-svn: 200938
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-0/+1
| | | | | | | | | | | | | | | | | | 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
* Remove the SplitDebug action and replace with a set of commandsEric Christopher2013-02-211-7/+0
| | | | | | | in the compilation setup. Note that this doesn't currently work for -no-integrated-as. llvm-svn: 175813
* Driver and option support for -gsplit-dwarf. This is a part ofEric Christopher2013-02-051-0/+7
| | | | | | the DWARF5 split dwarf proposal. llvm-svn: 174349
* 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
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-0/+7
| | | | | | | | | | | 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
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+24
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-1/+0
| | | | llvm-svn: 140407
* More missing header inclusions from llvm_unreachable migration.David Blaikie2011-09-231-0/+1
| | | | llvm-svn: 140369
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-1/+1
| | | | llvm-svn: 140367
* Add support for a verifier to the driver. Currently only verifies debugEric Christopher2011-08-231-0/+5
| | | | | | | | | | | output on darwin so is hard coded there. As a note this will need a little bit of refactoring in the class hierarchy to separate it out for different verifiers based on input type. Fixes rdar://8256258. llvm-svn: 138343
* 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
* Driver: Add an explicit dsymutil action.Daniel Dunbar2010-06-041-0/+5
| | | | llvm-svn: 105474
* Driver: Free Action objects.Daniel Dunbar2010-03-111-2/+4
| | | | llvm-svn: 98263
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-6/+6
| | | | llvm-svn: 81346
* Driver: I was too hasty in free'ing Actions, we sometimes shareDaniel Dunbar2009-03-181-3/+2
| | | | | | | Actions so a simple tree traversal isn't quite good enough. Leaving a FIXME for now. llvm-svn: 67161
* Driver: Move actions into Compilation, and construct the compilationDaniel Dunbar2009-03-181-1/+5
| | | | | | | | | | | earlier. - This gives us a simple ownership model, and allows clients access to more information should they ever want it. - We now free Actions correctly. llvm-svn: 67158
* Driver: Action vtables were still hungry.Daniel Dunbar2009-03-131-1/+1
| | | | llvm-svn: 66980
* Driver: Provide food and shelter for Action vtables.Daniel Dunbar2009-03-131-0/+44
| | | | llvm-svn: 66978
* ccc/Driver: Normalize phase spelling in -ccc-print-phases.Daniel Dunbar2009-03-131-6/+6
| | | | llvm-svn: 66912
* Driver: Add cast<> support for Action, and some other accessors.Daniel Dunbar2009-03-131-0/+17
| | | | llvm-svn: 66887
* Driver: Add majority of driver-driver implementation.Daniel Dunbar2009-03-121-0/+15
- Compare to driverdriver.c if bored; not completely fair since the driver gets a bit more code in other places to handle binding archs (for Xarch) but not completely unfair either. Fear not, extra Action classes will have a happy home for their vtables soon. llvm-svn: 66817
OpenPOWER on IntegriCloud