aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
AgeCommit message (Collapse)Author
2011-08-23Add support for a verifier to the driver. Currently only verifies debugEric Christopher
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138343 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18[driver] Don't generate diagnostics (i.e., preprocessed source) if reading Chad Rosier
from stdin. This allows Eli and the like to continue with their debugging trickery without loss of limb (or car) on my part. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137906 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17Fix else style. No functionality change intended.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137896 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17Fix typo.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137893 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12[driver] When generating clang failure diagnostics, don't try to preprocess Chad Rosier
inputs that aren't preprocessable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137532 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12[driver] Refactor a bit to enable a few fixes when generating diagnostics. ↵Chad Rosier
No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137524 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02Fix cmake for r136702 (at least for the most part). Chandler has been kind Chad Rosier
enough to offer to investigate the underlying issue. Thanks to Doug for his assistance as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136719 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02Temporarily revert parts of r136702 to make cmake builds happy.Chad Rosier
Someone with more cmake experience want to throw me a bone? :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136709 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02When the compiler crashes, the compiler driver now produces diagnostic Chad Rosier
information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. rdar://9575623 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136702 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27The -fapple-kext flag was designed to "do the right thing" for building code forChad Rosier
use in KEXTs. However, users/Xcode still need to tweak the linker flags to do the right thing, and end up using -Xlinker, for example. Instead, have the driver "do the right thing" when linking when -fapple-kext is present on the command line, and we should have Xcode use -fapple-kext instead of setting other flags like -Xlinker -kext or -nodefaultlibs. rdar://7809940 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136294 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon ↵Chris Lattner
Mulder! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135855 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner
LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20Temporarily revert r135614 while I fix the cmake build.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135621 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20When the compiler crashes, the compiler driver now produces diagnostic ↵Chad Rosier
information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135614 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16Correctly handle sysroot prefix in -print-search-dirs. Makes libtoolJoerg Sonnenberger
more happy on NetBSD. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135344 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15Prevent the -save-temps flag from modifying the input file if the input filenameChad Rosier
conflicts with a to be produced temp filename. rdar://9724657 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135308 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-21Driver: Factor out IsUsingLTO helper function.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133542 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04Identifiers with _CapitalLetter are reserved, so don't use them. Prefer theNick Lewycky
common C++ pattern of using the same name for the constructor argument as you do for the member. Noticed by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132626 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25A StringRef-ication of the DiagnosticIDs API and internals.Argyrios Kyrtzidis
Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static diagnostic data structures, which resulted in a huge global-var-init function. Depends on llvm commit r132046. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132047 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-06Rename ContainsCompileAction to ContainsCompileOrAssembleAction toJoerg Sonnenberger
properly reflect its behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130981 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-20Driver: Suppress some additional warnings with -Qunused-arguments.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129853 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-18Driver: Support -fno-lto.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129712 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-09refactor -ccc-gcc-name codeDylan Noblesmith
Put the logic for deciding the default name for gcc/g++ in the only place that actually cares about it. This also pushes an ifdef out of the generic driver code to a little further down, when the target is actually known. Hopefully it can be changed into just a runtime check in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129212 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-07Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to theDaniel Dunbar
existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to transparently capture the compiler diagnostics from a build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129082 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04Move Driver::createInvocationFromArgs function to Frontend library to avoid ↵Argyrios Kyrtzidis
dependency cycle between libFrontend and libDriver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04Introduce Driver::createInvocationFromArgs used to create a ↵Argyrios Kyrtzidis
CompilerInvocation from command-line args. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128848 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-25Driver/Darwin: Dsymutil actions should put the dSYM adjacent to the output file.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128292 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-23switch a few Driver APIs to use llvm::ArrayRef, cleaning up code.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128142 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-21Memorize presence/absence of -nostdlib in Driver.Joerg Sonnenberger
Drop program paths on NetBSD (unused). Only include lib dir, if -nostdlib is absent. Use = to allow --sysroot to work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127995 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-21Remember sysroot in Driver. Pass it down to ld for NetBSD, FreeBSDJoerg Sonnenberger
and DragonFly. Use the --sysroot= form for Linux. Fix handling of = prefix for -B. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127994 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18Driver: Give SelectTool access to the action inputs.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127902 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18On !Darwin, do use the integrated as with -static.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127879 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16Use C as fallback type if in C preprocessor mode.Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127769 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-07Redo part of r127137:Joerg Sonnenberger
Pass down the correct C->getArgs, but keep it with the original DerivedArgList type. Slightly adjust the MakeIndex call for the different base type. This unbreaks the handling of --no-mangle on Darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127142 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-07Explicitly initialize CCCIsCPPJoerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127139 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-06If called as *cpp or *cpp-[^-]*, run only the preprocessor. If noJoerg Sonnenberger
input is specified, use stdin implicitly. Based on a patch from Roman Divacky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127137 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-05Normalize target triple passed out of driver. Basically this meansAnton Korobeynikov
that at cc1 level we will always have normalized triple and thus can provide necessary default based on e.g. environment value (e.g. for "arm-eabi" triple, etc.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127087 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.NAKAMURA Takumi
No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125742 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-08Allow multiple -B prefixes. Patch by Joerg Sonnenberger.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125111 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03Moved here from LLVM Clang's configuration options and related macros.Oscar Fuentes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124825 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02clang: Add support for a CC_PRINT_HEADERS environment variable, which mirrorsDaniel Dunbar
CC_PRINT_OPTIONS and can be used to get some out-of-band information on header usage from a build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124751 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02Add NetBSD target support. Patch by Joerg Sonnenberger.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124736 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-12Driver: Change -dumpversion to return a GCC compatible answer.Daniel Dunbar
- See comment for why. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123296 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-10Replace all uses of PathV1::exists with PathV2::fs::exists.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123150 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 ↵Michael J. Spencer
equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18Replace all uses of PathV1::getLast with PathV2::filename.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17Going back to the drawing board with these two awful hacks.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122096 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17Fix spelling.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122088 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17Horrible hack for systems that use -dumpversion with clang to expect versionsEric Christopher
that match gcc versions. Eew. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122080 91177308-0d34-0410-b5e6-96231b3b80d8