aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Action.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-12-21Reapply "Change -save-temps to emit unoptimized bitcode files."Bob Wilson1-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
2014-12-18Revert "Change -save-temps to emit unoptimized bitcode files."Reid Kleckner1-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
2014-12-18Change -save-temps to emit unoptimized bitcode files.Bob Wilson1-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
2014-08-29unique_ptrify Driver Action handlingDavid Blaikie1-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
2014-02-06Move -verify-pch to use VerifyJobActionBen Langmuir1-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
2013-06-14[Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner1-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
2013-02-21Remove the SplitDebug action and replace with a set of commandsEric Christopher1-7/+0
in the compilation setup. Note that this doesn't currently work for -no-integrated-as. llvm-svn: 175813
2013-02-05Driver and option support for -gsplit-dwarf. This is a part ofEric Christopher1-0/+7
the DWARF5 split dwarf proposal. llvm-svn: 174349
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth1-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
2012-03-06Add new code migrator support for migrating existing Objective-C code to useTed Kremenek1-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
2011-12-20Unweaken vtables as per ↵David Blaikie1-0/+24
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
2011-09-23Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie1-1/+0
llvm-svn: 140407
2011-09-23More missing header inclusions from llvm_unreachable migration.David Blaikie1-0/+1
llvm-svn: 140369
2011-09-23Switch assert(0/false) llvm_unreachable.David Blaikie1-1/+1
llvm-svn: 140367
2011-08-23Add support for a verifier to the driver. Currently only verifies debugEric Christopher1-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
2010-12-31Remove stray emacs mode markers in all these files that was causing emacs toNick Lewycky1-1/+1
open them in fundamental-mode instead of c++-mode. Also twiddle whitespace for consistency in ToolChains.cpp. llvm-svn: 122646
2010-06-04Driver: Add an explicit dsymutil action.Daniel Dunbar1-0/+5
llvm-svn: 105474
2010-03-11Driver: Free Action objects.Daniel Dunbar1-2/+4
llvm-svn: 98263
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump1-6/+6
llvm-svn: 81346
2009-03-18Driver: I was too hasty in free'ing Actions, we sometimes shareDaniel Dunbar1-3/+2
Actions so a simple tree traversal isn't quite good enough. Leaving a FIXME for now. llvm-svn: 67161
2009-03-18Driver: Move actions into Compilation, and construct the compilationDaniel Dunbar1-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
2009-03-13Driver: Action vtables were still hungry.Daniel Dunbar1-1/+1
llvm-svn: 66980
2009-03-13Driver: Provide food and shelter for Action vtables.Daniel Dunbar1-0/+44
llvm-svn: 66978
2009-03-13ccc/Driver: Normalize phase spelling in -ccc-print-phases.Daniel Dunbar1-6/+6
llvm-svn: 66912
2009-03-13Driver: Add cast<> support for Action, and some other accessors.Daniel Dunbar1-0/+17
llvm-svn: 66887
2009-03-12Driver: Add majority of driver-driver implementation.Daniel Dunbar1-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