summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Try to fix the build after r244923Reid Kleckner2015-08-131-1/+1
| | | | llvm-svn: 244926
* [modules] Change the way we deal with .d output for explicitly-specified moduleRichard Smith2015-08-132-12/+17
| | | | | | | | | | | | | files: include the .pcm file itself in the .d output, rather than including its own input files. Other forms of module file continue to be transparent for .d output. Arguably, the input files for the .pcm file are still inputs to the compilation, but that's unnecessary for make-like build systems (where the mtime of the .pcm file is sufficient) and harmful for smarter build systems that know about module files and want to track only the local dependencies. llvm-svn: 244923
* Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.Ivan Krasin2015-08-134-27/+54
| | | | | | | | | | | | | | | | | | | Summary: Clang sanitizers, such as AddressSanitizer, ThreadSanitizer, MemorySanitizer, Control Flow Integrity and others, use blacklists to specify which types / functions should not be instrumented to avoid false positives or suppress known failures. This change adds the blacklist filenames to the list of dependencies of the rules, generated with -M/-MM/-MD/-MMD. This lets CMake/Ninja recognize that certain C/C++/ObjC files need to be recompiled (if a blacklist is updated). Reviewers: pcc Subscribers: rsmith, honggyu.kim, pcc, cfe-commits Differential Revision: http://reviews.llvm.org/D11968 llvm-svn: 244867
* Stop printing macro backtraces that don't help diagnostics.Richard Trieu2015-08-121-0/+39
| | | | | | | | | | | | | | | When displaying the macro backtrace, ignore some of the backtraces that do not provide extra information to the diagnostic. Typically, if the problem is entirely contained within a macro argument, the macro expansion is often not needed. Also take into account SourceRange's attached to the diagnostic when selecting which backtraces to ignore. Two previous test cases have also been updated. Patch by Zhengkai Wu, with minor formatting fixes. Differential Revision: http://reviews.llvm.org/D11778 llvm-svn: 244788
* [modules] Properly diagnose errors in module files for which we have noRichard Smith2015-08-112-9/+10
| | | | | | corresponding include location (those specified on the command line). llvm-svn: 244538
* Fix some tabs.Richard Smith2015-08-111-4/+3
| | | | llvm-svn: 244537
* [modules] Remove now-dead code for lazy loading of files specified by ↵Richard Smith2015-08-091-17/+3
| | | | | | -fmodule-file=. llvm-svn: 244417
* [modules] PR22534: Load files specified by -fmodule-file= eagerly. In ↵Richard Smith2015-08-091-69/+30
| | | | | | particular, this avoids the need to re-parse module map files when using such a module. llvm-svn: 244416
* Unrevert r244412 (reverted in r244414), and delete the bogus line left behindRichard Smith2015-08-091-1/+3
| | | | | | in the unit test that was checking a file the test no longer creates. llvm-svn: 244415
* Revert "[modules] Don't leak -M flags for dependency file generation into ↵Justin Bogner2015-08-091-3/+1
| | | | | | | | | | | | | | | the module" This was failing tests on a bunch of bots: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/29919/steps/check-all http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/29627/steps/check-all http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/9959/ http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/5591/ This reverts r244412 llvm-svn: 244414
* [modules] When building a dependency file, include module maps parsed in theRichard Smith2015-08-091-0/+30
| | | | | | current compilation, not just those from imported modules. llvm-svn: 244413
* [modules] Don't leak -M flags for dependency file generation into the moduleRichard Smith2015-08-091-1/+3
| | | | | | | | | | build process when we implicitly build a module. Previously, we'd create the specified .d file once for each implicitly-built module and then finally overwrite it with the correct contents after the requested build completes. (This fails if you use stdout as a dependency file, which is what the provided testcase does, and is how I discovered this brokenness.) llvm-svn: 244412
* [modules] Attach dependency listeners to the module manager once when it'sRichard Smith2015-08-091-9/+7
| | | | | | | | created, rather than creating and attaching a new listener each time we load a module file (yes, the old ones were kept around too!). No functionality change intended, but a bit more sanity. llvm-svn: 244411
* [Frontend] Fix crash when serializing diagnostics with really long text.Argyrios Kyrtzidis2015-08-061-1/+1
| | | | | | rdar://21896690 llvm-svn: 244245
* Rename the non-coding style conformant functions in namespace BuiltinsEric Christopher2015-08-062-2/+2
| | | | | | to match the rest of their brethren and reformat the bits that need it. llvm-svn: 244186
* Add -fno-coverage-mapping flag.Diego Novillo2015-08-051-1/+2
| | | | | | | This new flag allows the user to disable a previous instance of -fcoverage-mapping, if needed. llvm-svn: 244170
* function_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove itsRichard Smith2015-08-051-7/+6
| | | | | | | | useless return value. Switch to using it directly when completing the redeclaration chain for an anonymous declaration, and reduce the set of declarations that we load in the process to just those of the right kind. llvm-svn: 244161
OpenPOWER on IntegriCloud