summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Include system_error directly.Rafael Espindola2014-06-122-2/+2
| | | | llvm-svn: 210802
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210780
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-082-9/+9
| | | | llvm-svn: 210422
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-041-1/+1
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. llvm-svn: 210145
* cc1as: invert return bool to indicate failureAlp Toker2014-05-311-20/+13
| | | | | | | | This simplifies code flow and matches the convention used in surrounding code. No functional change. llvm-svn: 209936
* cc1as: fix a potential leak and unremoved output file in error conditionsAlp Toker2014-05-311-13/+17
| | | | llvm-svn: 209935
* Pass -gdwarf-N options to integrated assemblerOliver Stannard2014-05-191-0/+9
| | | | llvm-svn: 209124
* Eliminate DefaultImageName from the Driver constructorAlp Toker2014-05-151-1/+1
| | | | | | | | | | | | All callers were passing in "a.out" or garbage so a sensible default works fine here as a cleanup. This also brings about the possibility of adapting the value based on the driver's compatibility mode in future. The setting can still be changed via Driver::DefaultImageName as needed. llvm-svn: 208926
* Update for llvm api change.Rafael Espindola2014-05-071-1/+0
| | | | llvm-svn: 208206
* Update Target::createMCAsmParser calls for the LLVM interface change.Evgeniy Stepanov2014-04-231-1/+5
| | | | | | Patch by Yuri Gorshenin. llvm-svn: 206970
* CodeGen: Use LLVM's InstrProfReader in -fprofile-instr-use=Justin Bogner2014-04-182-1/+2
| | | | | | | | | Update clang to use the InstrProfReader from LLVM to read instrumentation based profile data. This also switches us from the naive text format to the binary format, since that's what's implemented in the reader. llvm-svn: 206658
* Comment necessity of early initializationDavid Blaikie2014-03-311-3/+5
| | | | | | | | | | | | Code review feedback from Eric Christopher on r204261. I didn't want to go into too much detail (the revision history should provide the full stuff) - but I can add more if that's preferred. Also moved this up to right by the construction of the MCAsmInfo so there's less chance that other things might sneak in in between. llvm-svn: 205267
* DebugInfo compression: Enable compression before any sections are created.David Blaikie2014-03-311-2/+4
| | | | | | | | | | | | | | | | | | | | For those playing at home this produced some fairly subtle behavior. The sections created in InitMCObjectFileInfo were created without compressed debug info (a mistake, but not necessarily /broken). Since these sections were almost always referenced by the existing MCSection object, this almost worked. This got weird when we got to handling the relocations for a section. See ELFObjectWriter::WriteSection where we compute the true section for a relocation section by simply stripping the ".rela" prefix and then looking up that section - doing so hit the compression codepath, looked up .zdebug_blah and found a newly constructed empty section... thus, things got weird. This is untestable without a cross-project test (let me know if people would prefer that to no testing). llvm-svn: 205261
* clang/tools/driver/Makefile: Quick fix corresponding to r205181.NAKAMURA Takumi2014-03-311-1/+1
| | | | llvm-svn: 205189
* Support for -Wa,-compress-debug-sections.David Blaikie2014-03-271-0/+4
| | | | | | Also, while I'm here, support -nocompress-debug-sections too. llvm-svn: 204959
* static link pollySebastian Pop2014-03-142-0/+19
| | | | llvm-svn: 203887
* Revert "CodeGen: Use a binary format for instrumentation based profiling"Justin Bogner2014-03-121-1/+0
| | | | | | | | | I've clearly done something wrong with how to get this to link correctly. Reverting for now. This reverts commit r203711. llvm-svn: 203712
* CodeGen: Use a binary format for instrumentation based profilingJustin Bogner2014-03-121-0/+1
| | | | | | | | This updates CodeGenPGO to use the ProfileDataReader introduced to llvm in r203703 and the new API for writing out the profile introduced to compiler-rt in r203710. llvm-svn: 203711
* Check for LLVM_ON_WIN32 instead of _WIN32.Hans Wennborg2014-03-121-2/+3
| | | | | | This is a follow-up to r203624 to address Anton's comment. llvm-svn: 203668
* Be case sensitive when determining driver mode based on argv[0] except on ↵Hans Wennborg2014-03-111-0/+3
| | | | | | | | | Windows This narrows the impact of r188833 after Dimitry pointed out that it's good to be able to tell the difference between 'cc' and 'CC'. llvm-svn: 203624
* Replace CLANG_IS_PRODUCTION with CLANG_PLUGIN_SUPPORT.Rafael Espindola2014-03-102-12/+11
| | | | llvm-svn: 203473
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-092-2/+2
| | | | llvm-svn: 203389
OpenPOWER on IntegriCloud