summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass the relocation model to LLVM for assembler files.Joerg Sonnenberger2015-09-181-2/+17
| | | | llvm-svn: 247981
* [CMake] Add install-clang target to install just the clang executableChris Bieneman2015-09-171-1/+7
| | | | | | For the llvm-tools we're generating install-${tool} targets which are very useful. We should have one for clang too. llvm-svn: 247912
* Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and ↵Daniel Sanders2015-09-151-6/+5
| | | | | | | | related. NFC. Eric has replied and has demanded the patch be reverted. llvm-svn: 247702
* Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* ↵Daniel Sanders2015-09-151-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and related. NFC. Summary: This is the first patch in the series to migrate Triple's (which are ambiguous) to TargetTuple's (which aren't). For the moment, TargetTuple simply passes all requests to the Triple object it holds. Once it has replaced Triple, it will start to implement the interface in a more suitable way. This change makes some changes to the public C++ API. In particular, InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer() now take TargetTuples instead of Triples. The other public C++ API's have been left as-is for the moment to reduce patch size. This commit also contains a trivial patch to clang to account for the C++ API change. Thanks go to Pavel Labath for fixing LLDB for me. Reviewers: rengolin Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10969 llvm-svn: 247692
* Revert r247684 - Replace Triple with a new TargetTuple ...Daniel Sanders2015-09-151-6/+5
| | | | | | LLDB needs to be updated in the same commit. llvm-svn: 247686
* Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.Daniel Sanders2015-09-151-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first patch in the series to migrate Triple's (which are ambiguous) to TargetTuple's (which aren't). For the moment, TargetTuple simply passes all requests to the Triple object it holds. Once it has replaced Triple, it will start to implement the interface in a more suitable way. This change makes some changes to the public C++ API. In particular, InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer() now take TargetTuples instead of Triples. The other public C++ API's have been left as-is for the moment to reduce patch size. This commit also contains a trivial patch to clang to account for the C++ API change. Reviewers: rengolin Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10969 llvm-svn: 247683
* Update to reflect the library set in LLVM changing.Chandler Carruth2015-08-181-1/+0
| | | | llvm-svn: 245320
* Update for llvm api change.Rafael Espindola2015-08-131-1/+1
| | | | llvm-svn: 244855
* [clang-cl] Add support for CL and _CL_ environment variablesDavid Majnemer2015-08-101-0/+32
| | | | | | | | | | cl uses 'CL' and '_CL_' to prepend and append command line options to the given argument vector. There is an additional quirk whereby '#' is transformed into '='. Differential Revision: http://reviews.llvm.org/D11896 llvm-svn: 244473
* Fix a tiny bug in -no-canonical-prefixes that somehow we have neverChandler Carruth2015-08-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | noticed until now. The code for setting up the driver's InstalledDir didn't respect -no-canonical-prefixes. Because of this, there are a few places in the driver where we would unexpectedly form absolute paths, notably when searching for and finding GCC installations to use, etc. The fix is straightforward, and I've added this path to '-v' both so we can test it sanely and so that it will be substantially more obvious the next time someone has to debug something here. Note that there is another bug that we don't actually *canonicalize* the installed directory! I don't really want to fix that because I don't have a realistic way to test the usage of this mode. I suspect that folks using the shared module cache would care about getting this right though, and so they might want to address it. I've left the appropriate FIXMEs so that it is clear what to change, and I've updated the test code to make it clear what is happening here. llvm-svn: 244065
* Fix the cc1as crash when it outputs assemblySteven Wu2015-07-241-0/+3
| | | | | | | | In clang cc1as_main, when the output file type is “asm”, AsmStreamer owns a formatted_raw_ostream which has a reference to FDOS (raw_ostream), so AsmStreamer must be closed before FDOS is closed. llvm-svn: 243085
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-171-2/+6
| | | | | | | | | | | | | - introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! llvm-svn: 242499
* [clang-cl] Use the Windows response file tokenizerReid Kleckner2015-07-151-41/+67
| | | | | | | | | | | | | | | | | | | | We were still using the Unix response file tokenizer for all driver modes. This was difficult to get right in the beginning because there is a circular dependency. The Driver class also can't officially determine its mode until it can see all possible --driver-mode= flags, and those flags could come from the response file. Now we use the Windows parsing algorithm if the program name looks like clang-cl, or if the --driver-mode=cl flag is present on the main command line. Fixes PR23709. Reviewers: hans Differential Revision: http://reviews.llvm.org/D11229 llvm-svn: 242346
* [CMake] Fill up required libs, corresponding to r241653.NAKAMURA Takumi2015-07-081-0/+1
| | | | llvm-svn: 241660
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-3/+3
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-3/+3
| | | | | | failures. llvm-svn: 241642
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-071-3/+3
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
* [CMake] clang-*.*: Prevent versioning if the buildhost is targeting for Win32.NAKAMURA Takumi2015-07-051-1/+5
| | | | | | | | | | | | | | CMake-2.8.12 is hardcoded to create symlinked clang.exe if the target property VERSION is present and the host is not Win32. Then clang.exe-*.* is generated and clang.exe is symlinked to it. lrwxrwxrwx. 1 bb bb 13 Jul 5 18:04 clang.exe -> clang.exe-3.7 -rwxr-x---. 1 bb bb 244763 Jul 5 18:04 clang++.exe -rwxr-x---. 1 bb bb 244763 Jul 5 18:04 clang.exe-3.7 It made me unhappy when built binaries were copied to the Windows target. FIXME: Could we just remove the target property VERSION in add_llvm_executable() ? llvm-svn: 241403
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-1/+1
| | | | llvm-svn: 240353
* Update for LLVM API change to return by InputArgList directly (rather than ↵David Blaikie2015-06-222-40/+40
| | | | | | by pointer) from ParseArgs llvm-svn: 240349
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-1/+1
| | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. llvm-svn: 240270
* ArrayRef-ify ParseArgsDavid Blaikie2015-06-212-6/+5
| | | | llvm-svn: 240237
* Introduce a PCHContainerOperations interface (NFC).Adrian Prantl2015-06-201-1/+3
| | | | | | | | | | | | | | | | A PCHContainerOperations abstract interface provides operations for creating and unwrapping containers for serialized ASTs (precompiled headers and clang modules). The default implementation is RawPCHContainerOperations, which uses a flat file for the output. The main application for this interface will be an ObjectFilePCHContainerOperations implementation that uses LLVM to wrap the module in an ELF/Mach-O/COFF container to store debug info alongside the AST. rdar://problem/20091852 llvm-svn: 240225
* Recommit r239721: Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | InitMCObjectFileInfo. NFC. Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar patches. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. The first time this was committed it accidentally fixed an inconsistency in triples in llvm-mc and this caused a failure. This inconsistency was fixed in r239808. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10366 llvm-svn: 239812
* Revert r239721 - Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-151-2/+2
| | | | | | | | InitMCObjectFileInfo. NFC. It appears to cause sparc-little-endian.s to assert on Windows and Darwin. llvm-svn: 239724
* Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.Daniel Sanders2015-06-151-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar trivial patches. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10366 llvm-svn: 239721
* Update for llvm api change.Rafael Espindola2015-06-131-14/+4
| | | | llvm-svn: 239670
* range-for'ify Args->filtered_begin(...) loopsSean Silva2015-06-091-4/+2
| | | | | | | We already have Args->filtered(...) which is a drop-in range-for replacement. llvm-svn: 239381
* 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
OpenPOWER on IntegriCloud