summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver
Commit message (Collapse)AuthorAgeFilesLines
* Revert r235749 - Accidentally commited cruft from the wrong path.Lang Hames2015-04-241-1/+0
| | | | llvm-svn: 235750
* [CodeGen] Make AsmPrinter's OutStreamer member a unique_ptr.Lang Hames2015-04-241-0/+1
| | | | | | | AsmPrinter owns the OutStreamer, so an owning pointer makes sense here. Using a reference for this is crufty. llvm-svn: 235749
* Use raw_pwrite_stream in clang.Rafael Espindola2015-04-141-3/+12
| | | | | | This is a small improvement to -emit-pth and allows llvm to start requiring it. llvm-svn: 234897
* Propagate usage of std:unique_ptr a bit. NFC.Rafael Espindola2015-04-091-5/+5
| | | | llvm-svn: 234538
* Update for LLVM api changes.Rafael Espindola2015-04-091-10/+9
| | | | llvm-svn: 234536
* Update for llvm commit r233648.Eric Christopher2015-03-311-3/+2
| | | | llvm-svn: 233649
* Update for llvm api change.Rafael Espindola2015-03-201-1/+2
| | | | llvm-svn: 232843
* Fix incremental linking with ninja and CMake 3.2+, see LLVM r232662 for detailsReid Kleckner2015-03-191-1/+1
| | | | llvm-svn: 232739
* Update for llvm API change.Rafael Espindola2015-03-161-2/+3
| | | | llvm-svn: 232430
* Update clang for llvm r231861.Eric Christopher2015-03-101-2/+2
| | | | llvm-svn: 231862
* [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.pyChandler Carruth2015-01-141-1/+1
| | | | | | | No functionality changed, this is a purely mechanical cleanup to ensure the #include order remains consistent across the project. llvm-svn: 225975
* Make DiagnosticsEngine::takeClient return std::unique_ptr<>Alexander Kornienko2014-11-171-2/+1
| | | | | | | | | | | | | | | | | | Summary: Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated callers to store conditional ownership using a pair of pointer and unique_ptr instead of a pointer + bool. Updated code that temporarily registers clients to use the non-owning registration (+ removed extra calls to takeClient). Reviewers: dblaikie Reviewed By: dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6294 llvm-svn: 222193
* Fix style.Michael J. Spencer2014-11-071-5/+3
| | | | llvm-svn: 221546
* [llvm-api-change] Use findProgramByName.Michael J. Spencer2014-11-041-3/+3
| | | | llvm-svn: 221222
* Driver: Include driver diagnostics when we --serialize-diagnosticsJustin Bogner2014-10-231-1/+15
| | | | | | | | | | | | | | | Currently, when --serialize-diagnostics is passed this only includes the diagnostics from clang -cc1, and driver diagnostics are dropped. This causes issues for tools that use the serialized diagnostics, since stderr is lost and these diagnostics aren't seen at all. We handle this by merging the diagnostics from the CC1 process and the driver diagnostics into a single file when the driver invokes CC1. Fixes rdar://problem/10585062 llvm-svn: 220525
* Driver: Make FailingCommand mandatory for generateCompilationDiagnosticsJustin Bogner2014-10-201-3/+7
| | | | | | | | | | | | | We currently use a null FailingCommand when generating crash reports as an indication that the cause is FORCE_CLANG_DIAGNOSTICS_CRASH, the environment variable that exists to test crash dumps. This means that our tests don't actually cover real crashes at all, and adds a more complicated code path that's only used in the tests. Instead, we can have the driver synthesize that every command failed and just call generateCompilationDiagnostics normally. llvm-svn: 220234
* Driver: support detecting driver mode when clang has a version suffix ↵Hans Wennborg2014-10-171-76/+81
| | | | | | | | | | | | | | without dash (PR21094) Clang would previously not get into C++ mode when invoked as 'clang++3.6' (though clang++-3.6 would work). I found the previous loop logic in this function confusing; hopefully this makes it a little clearer. Differential Revision: http://reviews.llvm.org/D5833 llvm-svn: 220052
* Speculatively fix GCC 4.7 build after r219938Hans Wennborg2014-10-161-1/+1
| | | | llvm-svn: 219941
* Use iterators and algorithms to possibly make this code a bit tidierDavid Blaikie2014-10-161-16/+12
| | | | | | | | | | | | | (also, the code executed once the element was found was split half inside the loop and half after it - now put it all together after the find operation) I'm a bit concerned that this code is rather untested (commenting out this whole function and running check-clang doesn't fail any tests)... And I wish I had polymorphic lambdas. llvm-svn: 219938
* Use array_lengthof; NFC.Hans Wennborg2014-10-161-1/+1
| | | | llvm-svn: 219935
* Update for llvm api change.Rafael Espindola2014-10-151-3/+2
| | | | llvm-svn: 219800
* driver: Map closed standard file descriptors to /dev/nullDavid Majnemer2014-10-061-0/+3
| | | | | | | | Utilize Process::FixupStandardFileDescriptors, introduced in r219170, to guard against files from being treated as one of the standard file descriptors. llvm-svn: 219174
* Use the simpler version of llvm::sys::fs::exists.Rafael Espindola2014-09-111-2/+1
| | | | | | | In all these cases it looks like the intention was to handle error in a similar way to the file not existing. llvm-svn: 217614
* Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor ↵Craig Topper2014-08-301-1/+1
| | | | | | and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>. llvm-svn: 216824
* One other BuryPointer of a unique_ptr cleanup.David Blaikie2014-08-291-1/+1
| | | | llvm-svn: 216743
* Convert MC command line flag for fatal assembler warnings into a properJoerg Sonnenberger2014-08-261-1/+4
| | | | | | flag. llvm-svn: 216472
* Update for llvm api change.Rafael Espindola2014-08-251-7/+6
| | | | llvm-svn: 216397
* Fix PR17239 by changing the semantics of the RemainingArgsClass Option kindReid Kleckner2014-08-221-2/+27
| | | | | | | | | | | | | | | | | | | | | | | This patch aims at fixing PR17239. This bug happens because the /link (clang-cl.exe argument) is marked as "consume all remaining arguments". However, when inside a response file, /link should only consume all remaining arguments inside the response file where it is located, not the entire command line after expansion. The LLVM side of the patch will change the semantics of the RemainingArgsClass kind to always consume only until the end of the response file when the option originally came from a response file. There are only two options in this class: dash dash (--) and /link. This is the Clang side of the patch in http://reviews.llvm.org/D4899 Reviewered By: rafael, rnk Differential Revision: http://reviews.llvm.org/D4900 Patch by Rafael Auler! llvm-svn: 216281
* Update Clang for LLVM API change to use unique_ptr in ↵David Blaikie2014-08-211-1/+1
| | | | | | SourceManager::AddNewSourceBuffer llvm-svn: 216226
* Revert "Update for LLVM change (StringSaver)"Sean Silva2014-08-151-2/+13
| | | | | | | | | This reverts commit r215785 / 170ebf4f19459ae51a9561d0e65c87ee4c9b2c97. LLD has some StringSavers that need to be updated. One of which takes a lock and I need to investigate that more closely. llvm-svn: 215791
* Update for LLVM change (StringSaver)Sean Silva2014-08-151-13/+2
| | | | | | | | There is more cleanup to be done here. Once llvm::sys::Process::GetArgumentVector is switched over to StringSaver, we can simplify this code a fair amount. llvm-svn: 215785
* Rename as suggested by dblaikieSean Silva2014-08-151-2/+2
| | | | llvm-svn: 215774
* ArrayRef'izeSean Silva2014-08-153-23/+19
| | | | | | | I've shied away from ArrayRef'izing CompilerInvocation::CreateFromArgs in this commit because that is a less localized change. llvm-svn: 215773
* Rename this function to better reflect its purposeSean Silva2014-08-151-2/+2
| | | | | | Thanks to dblaikie for the impetus to look for a better name. llvm-svn: 215767
* [cleanup] Rename this function to better reflect its purpose. NFC.Sean Silva2014-08-151-9/+9
| | | | | | | | | | This also suggests some refactoring to simplify this code. Basically, a ton of complexity in this argument handling code comes from the need to save const char *'s in stable storage for pushing onto argv. It seems like llvm::cl::StringSaver can be improved to cover all the needs here. llvm-svn: 215761
* [cleanup] Range-for'ify this loop. NFC.Sean Silva2014-08-151-4/+3
| | | | llvm-svn: 215760
* [cleanup] Factor out handling CC1 tools. NFC.Sean Silva2014-08-151-14/+15
| | | | llvm-svn: 215759
* [cleanup] Factor out setting the driver's install dir. NFC.Sean Silva2014-08-151-20/+22
| | | | llvm-svn: 215756
* [cleanup] Factor out initializing the DianosticOptions. NFC.Sean Silva2014-08-151-13/+19
| | | | llvm-svn: 215755
* [cleanup] Factor out adjusting "cl.exe" to "clang-cl.exe". NFC.Sean Silva2014-08-151-7/+11
| | | | llvm-svn: 215754
* [cleanup] Factor out some checks. NFC.Sean Silva2014-08-151-14/+18
| | | | | | | | | | | The core logic in main() is actually pretty simple, but there's lots of stuff that has been added over time which obscures the flow of the code. In upcoming patches, I'll be pulling more stuff out of the main codepath. I'm open to naming suggestions for these helper functions. llvm-svn: 215751
* Make clang's rewrite engine a core featureAlp Toker2014-07-161-5/+2
| | | | | | | | | | | | | | | The rewrite facility's footprint is small so it's not worth going to these lengths to support disabling at configure time, particularly since key compiler features now depend on it. Meanwhile the Objective-C rewriters have been moved under the ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still potentially worth excluding from lightweight builds. Tests are now passing with any combination of feature flags. The flags historically haven't been tested by LLVM's build servers so caveat emptor. llvm-svn: 213171
* Prune Redundant libdeps in CMake's target_link_libraries and LLVMBuild.txt.NAKAMURA Takumi2014-07-151-1/+0
| | | | | | I checked this with Release+Asserts on x86_64-mingw32. Please restore partially if this were overkill. llvm-svn: 213064
* Remove dead code from r212620Alp Toker2014-07-091-35/+3
| | | | llvm-svn: 212622
* cc1as: consolidate option flags with cc1 and eliminate duplicationAlp Toker2014-07-091-12/+48
| | | | | | | | | | The clang -cc1as options are nearly a strict subset of -cc1. Instead of duplicating the definitions and documentation, let's go ahead and share the definitions in a similar way the current handling of combined driver and frontend flags, eliminating some of the vestigial legacy surrounding the assembler subcommand. llvm-svn: 212620
* Driver: Produce crash diagnostics more often on WindowsReid Kleckner2014-07-071-2/+7
| | | | | | | | | | | | | Assertion failures call abort(), which return an exit code of 3 on Windows. The 'not' utility has the same check. Unfortunately, the crash-report.c test requires a shell, so it does not run for me locally, so I can only test this manually. There's still more work to be done here: we should generate a batch script instead of a shell script on Windows. llvm-svn: 212481
* Update for llvm api change.Rafael Espindola2014-07-061-5/+6
| | | | llvm-svn: 212408
* driver: add link dependency on CodeGenAlp Toker2014-07-011-0/+1
| | | | | | | | | | Fix the build when no targets are enabled. This dependency is incurred by two unfortunate entries in LinkAllPasses.h included from cc1_main.cpp: llvm::createJumpInstrTablesPass(); llvm::createCodeGenPreparePass(); llvm-svn: 212084
* Remove llvm:: from uses of ArrayRef.Craig Topper2014-06-281-1/+1
| | | | llvm-svn: 211987
* Refer to error_code with the std prefix.Rafael Espindola2014-06-121-1/+2
| | | | llvm-svn: 210817
OpenPOWER on IntegriCloud