summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] Allow the error when explicitly loading an incompatible module fileRichard Smith2015-10-161-5/+14
| | | | | | | | | via -fmodule-file= to be turned off; in that case, just include the relevant files textually. This allows module files to be unconditionally passed to all compile actions via CXXFLAGS, and to be ignored for rules that specify custom incompatible flags. llvm-svn: 250577
* [Frontend/CompilerInvocation] Use range-based loop. NFC.Davide Italiano2015-10-161-2/+2
| | | | llvm-svn: 250559
* Refactor module lookup when looking up a header file, and wire through the ↵Richard Smith2015-10-161-1/+2
| | | | | | requesting module. No functionality change. llvm-svn: 250554
* Recommit "Clang support for -flto=thin."Teresa Johnson2015-10-151-1/+3
| | | | | | | | | This recommits r250398 with fixes to the tests for bot failures. Add "-target x86_64-unknown-linux" to the clang invocations that check for the gold plugin. llvm-svn: 250455
* Revert "Clang support for -flto=thin." (bot failures)Teresa Johnson2015-10-151-3/+1
| | | | | | | | | | | Rolling this back for now since there are a couple of bot failures on the new tests I added, and I won't have a chance to look at them in detail until later this afternoon. I think the new tests need some restrictions on having the gold plugin available. This reverts commit r250398. llvm-svn: 250402
* Clang support for -flto=thin.Teresa Johnson2015-10-151-1/+3
| | | | | | | | | | | | | | | | | | | Summary: Add clang support for -flto=thin option, which is used to set the EmitFunctionSummary code gen option on compiles. Add -flto=full as an alias to the existing -flto. Add tests to check for proper overriding of -flto variants on the command line, and convert grep tests to FileCheck. Reviewers: dexonsmith, joker.eph Subscribers: davidxl, cfe-commits Differential Revision: http://reviews.llvm.org/D11908 llvm-svn: 250398
* Bring back r250262: PS4 toolchainFilipe Cabecinhas2015-10-141-0/+23
| | | | | | | | | | | | | | There was a minor problem with a test. Sorry for the noise yesterday. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250293
* Revert-to-green r250262 (PS4 toolchain patch)Sean Silva2015-10-141-23/+0
| | | | | | | It is breaking llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast e.g. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/1362 llvm-svn: 250273
* I took care of the build problem in the commit 250252.Ekaterina Romanova2015-10-141-0/+23
| | | | | | | | | | | | | | Resubmitting the patch. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250262
* reverting my patch, cause build problemsEkaterina Romanova2015-10-141-23/+0
| | | | llvm-svn: 250257
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-10-131-0/+23
| | | | | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250252
* Support Debug Info path remappingSaleem Abdulrasool2015-10-121-0/+3
| | | | | | | | | | | | | | | | Add support for the `-fdebug-prefix-map=` option as in GCC. The syntax is `-fdebug-prefix-map=OLD=NEW`. When compiling files from a path beginning with OLD, change the debug info to indicate the path as start with NEW. This is particularly helpful if you are preprocessing in one path and compiling in another (e.g. for a build cluster with distcc). Note that the linearity of the implementation is not as terrible as it may seem. This is normally done once per file with an expectation that the map will be small (1-2) entries, making this roughly linear in the number of input paths. Addresses PR24619. llvm-svn: 250094
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-29/+9
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
* [WinEH] Remove NewMSEH and enable its behavior by defaultReid Kleckner2015-10-081-1/+0
| | | | | | | Testing has shown that it is at least as reliable as the old landingpad pattern matching code. llvm-svn: 249647
* Fix Clang-tidy modernize-use-nullptr warnings in source directories; other ↵Hans Wennborg2015-10-061-6/+6
| | | | | | | | | | minor cleanups Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13406 llvm-svn: 249484
* [Tooling] Reuse FileManager in ASTUnit.Benjamin Kramer2015-10-061-13/+9
| | | | | | | | ASTUnit was creating multiple FileManagers and throwing them away. Reuse the one from Tooling. No functionality change now but necessary for VFSifying tooling. llvm-svn: 249410
* Use llvm::errc instead of std::errc.Rafael Espindola2015-10-051-1/+1
| | | | llvm-svn: 249302
* Add -f[no-]declspec to control recognition of __declspec as a keywordSaleem Abdulrasool2015-10-041-0/+11
| | | | | | | | | | | | | | | In versions of clang prior to r238238, __declspec was recognized as a keyword in all modes. It was then changed to only be enabled when Microsoft or Borland extensions were enabled (and for CUDA, as a temporary measure). There is a desire to support __declspec in Playstation code, and possibly other environments. This commit adds a command-line switch to allow explicit enabling/disabling of the recognition of __declspec as a keyword. Recognition is enabled by default in Microsoft, Borland, CUDA, and PS4 environments, and disabled in all other environments. Patch by Warren Ristow! llvm-svn: 249279
* Replace double negation of !FileID.isInvalid() with FileID.isValid().Yaron Keren2015-10-033-6/+6
| | | | | | +couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
* Replace double-negated !SourceLocation.isInvalid() with ↵Yaron Keren2015-10-033-5/+5
| | | | | | SourceLocation.isValid(). llvm-svn: 249228
* Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] ↵Alexandros Lamprineas2015-10-021-0/+3
| | | | | | | | targets. Differential Revision: http://reviews.llvm.org/D12633 llvm-svn: 249140
* C++11 rangify for loops, NFC.Yaron Keren2015-10-011-29/+21
| | | | llvm-svn: 249001
* Revert "This patch adds missing pieces to clang, including the PS4 toolchain ↵Greg Bedwell2015-09-251-23/+0
| | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." This reverts commit r248546 to get our bot green again while we discuss the best way forward. llvm-svn: 248578
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-09-241-0/+23
| | | | | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D11279 llvm-svn: 248546
* Improve the printing of ranges when macros are involved.Richard Trieu2015-09-241-28/+81
| | | | | | | | | | | | Trace the ranges through the macro backtrace better. This allows better range highlighting through all levels of the macro bracktrace. Also some improvements to backtrace printer for omitting different backtraces. Patch by Zhengkai Wu. Differential Revision: http://reviews.llvm.org/D12379 llvm-svn: 248454
* [CUDA] Allow parsing of host and device code simultaneously.Artem Belevich2015-09-223-5/+18
| | | | | | | | | | | | * adds -aux-triple option to specify target triple * propagates aux target info to AST context and Preprocessor * pulls in target specific preprocessor macros. * pulls in target-specific builtins from aux target. * sets appropriate host or device attribute on builtins. Differential Revision: http://reviews.llvm.org/D12917 llvm-svn: 248299
* [CUDA] Allow function overloads in CUDA based on host/device attributes.Artem Belevich2015-09-221-0/+3
| | | | | | | | | | | | | | | | | | | The patch makes it possible to parse CUDA files that contain host/device functions with identical signatures, but different attributes without having to physically split source into host-only and device-only parts. This change is needed in order to parse CUDA header files that have a lot of name clashes with standard include files. Gory details are in design doc here: https://goo.gl/EXnymm Feel free to leave comments there or in this review thread. This feature is controlled with CC1 option -fcuda-target-overloads and is disabled by default. Differential Revision: http://reviews.llvm.org/D12453 llvm-svn: 248295
* Further simplify the interface of PCHContainerGeneratorAdrian Prantl2015-09-192-5/+5
| | | | | | | | by dropping the const qualifier on the CI. NFC llvm-svn: 248101
* Simplify the interface of PCHContainerGenerator and friendsAdrian Prantl2015-09-182-24/+9
| | | | | | | | by passing in a CompilerInstance instead of all its individual members. NFC. llvm-svn: 248053
* createOutputFile should set Error to something if it returns null.Douglas Katzman2015-09-171-1/+3
| | | | | | | This is not portably unit-testable because the only visible effect is a change from one random message string to another. llvm-svn: 247900
* Emiting llvm.invariant.group.barrier when dynamic type changesPiotr Padlewski2015-09-151-0/+1
| | | | | | | | | For more goto: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html http://reviews.llvm.org/D12312 llvm-svn: 247723
* [CUDA] Postprocess bitcode linked in during device-side CUDA compilation.Artem Belevich2015-09-101-0/+3
| | | | | | | | Link in and internalize the symbols we need from supplied bitcode library. Differential Revision: http://reviews.llvm.org/D11664 llvm-svn: 247317
* Re-commit r247218: "Fix Clang-tidy misc-use-override warnings, other minor ↵Hans Wennborg2015-09-101-2/+4
| | | | | | | | fixes" This never broke the build; it was the LLVM side, r247216, that caused problems. llvm-svn: 247302
* EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)Mehdi Amini2015-09-101-52/+20
| | | | | | | | | | | | | | | This reapply a variant commit r247179 after post-commit review from D.Blaikie. Hopefully I got it right this time: lifetime of initializer list ends as with any expression, which make invalid the pattern: ArrayRef<int> Arr = { 1, 2, 3, 4}; Just like StringRef, ArrayRef shouldn't be used to initialize local variable but only as function argument. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247233
* Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"Hans Wennborg2015-09-101-4/+2
| | | | | | | | | | | Seems it broke the Polly build. From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio: In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0: /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()' /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error: overriding 'virtual llvm::Init::~Init() noexcept (true)' llvm-svn: 247222
* Fix Clang-tidy misc-use-override warnings, other minor fixesHans Wennborg2015-09-101-2/+4
| | | | | | | | Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D12741 llvm-svn: 247218
* Revert "EmitRecordWith* API change: takes an ArrayRef instead of a ↵Mehdi Amini2015-09-091-22/+55
| | | | | | | | | SmallVector (NFC)" This reverts commit r247179. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247183
* EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)Mehdi Amini2015-09-091-55/+22
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247179
* Fix a small bug in clang where generating some temporary files would have an ↵Argyrios Kyrtzidis2015-09-091-1/+1
| | | | | | | | extra period before the extension. Patch by Cameron Esfahani! llvm-svn: 247160
* [Solaris] Use the GCC Installation detector to add the C++ include paths.Rafael Espindola2015-09-091-9/+0
| | | | | | Patch by Xan López! llvm-svn: 247144
* Fix crash on invalid if we can't find a suitable PCH file in a specifiedRichard Smith2015-09-041-1/+1
| | | | | | | directory, and our frontend action cares whether the frontend setup actually succeeded. llvm-svn: 246881
* Use new utility function to clean leading junk from pathnames. NFCDouglas Katzman2015-09-021-18/+3
| | | | llvm-svn: 246714
* Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output.Ivan Krasin2015-09-021-1/+1
| | | | | | | | | | | | | | | | | Summary: Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output. Introduce a frontend option -fdepfile-entry, and only insert them for the user-defined sanitizer blacklists. In frontend, grab ExtraDeps from -fdepfile-entry, instead of -fsanitize-blacklist. Reviewers: rsmith, pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12544 llvm-svn: 246700
* Fix macro backtrace printing.Richard Trieu2015-08-271-8/+14
| | | | | | | | Sometimes, a macro that expands to another macro name will not be printed in the macro backtrace. This patch finds the missed macro expansions and prints them. Fixes PR16799 llvm-svn: 246237
* Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1Adrian Prantl2015-08-273-8/+9
| | | | | | | | | | | | | to enable the use of external type references in the debug info (a.k.a. module debugging). The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1. All this does at the moment is set a flag codegenopts. http://reviews.llvm.org/D11958 llvm-svn: 246192
* Initialize the AST consumer as soon as we have both an ASTConsumer and anRichard Smith2015-08-182-9/+15
| | | | | | | ASTContext. Fixes some cases where we could previously initialize the AST consumer more than once. llvm-svn: 245346
* [modules] When explicitly building a module file, don't include timestamps inRichard Smith2015-08-172-1/+4
| | | | | | | the produced pcm file for stable file creation across distributed build systems. llvm-svn: 245199
* [modules] Stop dropping 'module.timestamp' files into the current directoryRichard Smith2015-08-152-6/+11
| | | | | | when building with implicit modules disabled. llvm-svn: 245136
* [modules] Add an experimental -cc1 feature to embed the contents of an inputRichard Smith2015-08-142-2/+12
| | | | | | | | | | | file in the .pcm files. This allows a smaller set of files to be sent to a remote build worker when building with explicit modules (for instance, module map files need not be sent along with the corresponding precompiled modules). This doesn't actually make the embedded files visible to header search, so it's not useful as a packaging format for public header files. llvm-svn: 245028
* [modules] For explicit module file dependencies, only list direct dependency ↵Richard Smith2015-08-132-1/+4
| | | | | | module files. llvm-svn: 244931
OpenPOWER on IntegriCloud