summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendActions.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify the interface of PCHContainerGenerator and friendsAdrian Prantl2015-09-181-10/+4
| | | | | | | | by passing in a CompilerInstance instead of all its individual members. NFC. llvm-svn: 248053
* [modules] When explicitly building a module file, don't include timestamps inRichard Smith2015-08-171-1/+3
| | | | | | | the produced pcm file for stable file creation across distributed build systems. llvm-svn: 245199
* [modules] Add an experimental -cc1 feature to embed the contents of an inputRichard Smith2015-08-141-2/+11
| | | | | | | | | | | 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
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-171-4/+4
| | | | | | | | | | | | | - 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
* [Modules] Consider -fmodule-feature in module hash and when loadingBen Langmuir2015-06-231-0/+7
| | | | | | | Any extra features from -fmodule-feature are part of the module hash and need to get validated on load. Also print them with -module-file-info. llvm-svn: 240433
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-1/+1
| | | | llvm-svn: 240353
* 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
* Introduce a PCHContainerOperations interface (NFC).Adrian Prantl2015-06-201-20/+39
| | | | | | | | | | | | | | | | 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
* [modules] Retain the name as written for umbrella headers and directories, ↵Richard Smith2015-05-161-30/+22
| | | | | | rather than converting to an absolute path. No observable change expected, but this allows us to correctly compute the module for an umbrella header, which later changes will require. llvm-svn: 237508
* Use raw_pwrite_stream in clang.Rafael Espindola2015-04-141-6/+1
| | | | | | This is a small improvement to -emit-pth and allows llvm to start requiring it. llvm-svn: 234897
* Bring r234620 back now that llvm is fixed.Rafael Espindola2015-04-131-6/+5
| | | | | | | | | | LLVM can now detect if a fd is seekable on windows. Original commit message: Actually check if lseek works instead of using a filename based heuristic. llvm-svn: 234738
* Reformat.NAKAMURA Takumi2015-04-131-3/+3
| | | | llvm-svn: 234731
* Revert r234620 and others, "Actually check if lseek works instead of using a ↵NAKAMURA Takumi2015-04-131-6/+6
| | | | | | | | | | filename based heuristic." It was affected by r234615, which was reverted in r234721. r234620, "Actually check if lseek works instead of using a filename based heuristic." r234621, "Testcase for the previous commit." r234718, "Suppress clang/test/PCH/emit-pth.c on win32, for now while investigating." llvm-svn: 234730
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-3/+2
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* Actually check if lseek works instead of using a filename based heuristic.Rafael Espindola2015-04-101-6/+6
| | | | llvm-svn: 234620
* Return a pointer instead of having a pointer outparam and a bool return.Rafael Espindola2015-04-101-15/+15
| | | | llvm-svn: 234592
* Return a pointer instead of having a pointer outparam and a bool return.Rafael Espindola2015-04-101-13/+13
| | | | llvm-svn: 234590
* Ensure that we still parse preprocessed CUDA files as CUDA when we useArtem Belevich2015-03-191-0/+1
| | | | | | | | | -save-temps option. Summary: Fixes PR22926. Review: http://reviews.llvm.org/D8383 llvm-svn: 232737
* Remove many superfluous SmallString::str() calls.Yaron Keren2015-03-181-1/+1
| | | | | | | | | | | | | | | Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. llvm-svn: 232622
* [modules] Teach the AST reader to handle the case of importing a moduleChandler Carruth2015-03-141-2/+2
| | | | | | | | | | | | | | | | | | | with a subset of the existing target CPU features or mismatched CPU names. While we can't check that the CPU name used to build the module will end up being able to codegen correctly for the translation unit, we actually check that the imported features are a subset of the existing features. While here, rewrite the code to use std::set_difference and have it diagnose all of the differences found. Test case added which walks the set relationships and ensures we diagnose all the right cases and accept the others. No functional change for implicit modules here, just better diagnostics. llvm-svn: 232248
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-251-36/+4
| | | | llvm-svn: 230454
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-251-4/+36
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-241-36/+4
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-241-4/+36
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. llvm-svn: 230305
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-211-36/+4
| | | | | | | | This reverts commit 230099. The Linux configure+make build variant still needs some work. llvm-svn: 230103
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-4/+36
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 2. llvm-svn: 230089
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-201-36/+4
| | | | | | | | This reverts commit r230067. Investigating another batch of problems found by the bots. llvm-svn: 230073
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-4/+36
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. llvm-svn: 230067
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-201-36/+4
| | | | | | | | | This reverts commit r230044 while dealing with buildbot breakage. Conflicts: test/Modules/module_container.m llvm-svn: 230052
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-4/+36
| | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 llvm-svn: 230044
* Revert "Mangle the IsSystem bit into the .pcm file name"Ben Langmuir2015-02-191-1/+1
| | | | | | | | While I investigate some possible problems with this patch. This reverts commit r228966 llvm-svn: 229910
* [PCH/Modules] Check that the specific module cache path the PCH was built ↵Argyrios Kyrtzidis2015-02-191-0/+2
| | | | | | | | | | | | with, is the same as the one in the current compiler invocation. If they differ reject the PCH. This protects against the badness occurring from getting modules loaded from different module caches (see crashes). rdar://19889860 llvm-svn: 229909
* Mangle the IsSystem bit into the .pcm file nameBen Langmuir2015-02-121-1/+1
| | | | | | | | | When mangling the module map path into a .pcm file name, also mangle the IsSystem bit, which can also depend on the header search paths. For example, the user may change from -I to -isystem. This can affect diagnostics in the importing TU. llvm-svn: 228966
* [modules] Track how 'header' directives were written in module map files,Richard Smith2014-12-021-28/+43
| | | | | | | | | | | | | rather than trying to extract this information from the FileEntry after the fact. This has a number of beneficial effects. For instance, diagnostic messages for failed module builds give a path relative to the "module root" rather than an absolute file path, and the contents of the module includes file is no longer dependent on what files the including TU happened to inspect prior to triggering the module build. llvm-svn: 223095
* [modules] When a .pcm file is explicitly built separately from the translationRichard Smith2014-10-311-2/+2
| | | | | | unit, allow the -O settings of the two compilations to differ. llvm-svn: 220943
* Make VFS and FileManager match the current MemoryBuffer API.Benjamin Kramer2014-10-261-4/+4
| | | | | | | This eliminates converting back and forth between the 3 formats and gives us a more homogeneous interface. llvm-svn: 220657
* Improve unique_ptr-y ownership in ASTUnit::ComputePreambleDavid Blaikie2014-08-291-3/+2
| | | | | | | | | | | | | | Rather than having a pair of pairs and a reference out parameter, build a structure with everything together and named. A raw pointer and a unique_ptr, rather than a raw pointer and a boolean, are used to communicate ownership transfer. It's possible one day we'll end up with a conditional pointer (probably represented by a raw pointer and a boolean) abstraction to use in places like this. Conditional ownership seems to be coming up more often than I'd hoped... llvm-svn: 216712
* Update for LLVM api change.Rafael Espindola2014-08-271-2/+2
| | | | llvm-svn: 216585
* Return a std::unique_ptr from getBufferForFile. NFC.Rafael Espindola2014-08-261-3/+2
| | | | llvm-svn: 216476
* Update for llvm api change.Rafael Espindola2014-08-251-3/+3
| | | | llvm-svn: 216397
* Use StringRef instead of MemoryBuffer&.Rafael Espindola2014-08-121-1/+2
| | | | | | | This code doesn't care where the data it is processing comes from, so a StringRef is probably the most natural interface. llvm-svn: 215448
* Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dumpRichard Smith2014-08-111-0/+1
| | | | | | | | anyway. If -ast-dump *is* also provided, then dump the AST declarations as well as the lookup results. This is invaluable for cross-correlating the lookup information with the declarations actually found. llvm-svn: 215393
* Change MemoryBuffer* to MemoryBuffer& parameter to Lexer::ComputePreambleDavid Blaikie2014-08-111-1/+1
| | | | | | | | | | | | | (dropping const from the reference as MemoryBuffer is immutable already, so const is just redundant - and while I'd personally put const everywhere, that's not the LLVM Way (see llvm::Type for another example of an immutable type where "const" is omitted for brevity)) Changing the pointer argument to a reference parameter makes call sites identical between callers with unique_ptrs or raw pointers, minimizing the churn in a pending unique_ptr migrations. llvm-svn: 215391
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-101-30/+33
| | | | | | | | After post-commit review and community discussion, this seems like a reasonable direction to continue, making ownership semantics explicit in the source using the type system. llvm-svn: 215323
* Refactor the module map file used for uniquing a module name out ofBen Langmuir2014-08-091-3/+5
| | | | | | | | | class Module. It's almost always going to be the same as getContainingModule() for top-level modules, so just add a map to cover the remaining cases. This lets us do less bookkeeping to keep the ModuleMap fields up to date. llvm-svn: 215268
* Use -Rblah, not -Wblah, to control remark diagnostics. This was always theRichard Smith2014-08-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | intent when we added remark support, but was never implemented in the general case, because the first -R flags didn't need it. (-Rpass= had special handling to accomodate its argument.) -Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark, or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything does not affect remarks, and -Reverything does not affect warnings or errors. The only "real" -R flag we have right now is -Rmodule-build; that flag is effectively renamed from -Wmodule-build to -Rmodule-build by this change. -Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and -Rno-pass by this change; it's not completely clear whether we intended to have a -Rpass (with no =pattern), but that is unchanged by this commit, other than the flag name. The default pattern is effectively one which matches no passes. In future, we may want to make the default pattern be .*, so that -Reverything works for -Rpass properly. llvm-svn: 215046
* Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie2014-07-171-33/+30
| | | | | | | | | This reverts commit r213307. Reverting to have some on-list discussion/confirmation about the ongoing direction of smart pointer usage in the LLVM project. llvm-svn: 213325
* unique_ptr-ify ownership of ASTConsumersDavid Blaikie2014-07-171-30/+33
| | | | | | | | | (after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
* Refer to error_code with the std prefix.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210817
* Include system_error directly.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210802
OpenPOWER on IntegriCloud