summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Eliminate ASTContext's DelayInitialization flagAlp Toker2014-05-032-11/+6
| | | | | | | | | Having various possible states of initialization following construction doesn't add value here. Also remove the unused size_reserve parameter. llvm-svn: 207897
* Reformat code following Preprocessor constructor updatesAlp Toker2014-05-022-10/+7
| | | | | | Landing this separately to make the previous commits easy to follow at home. llvm-svn: 207826
* Factor TargetInfo pointer/DelayInitialization bool pair out of Preprocessor ctorAlp Toker2014-05-022-5/+4
| | | | | | | | The Preprocessor::Initialize() function already offers a clear interface to achieve this, further reducing the confusing number of states a newly constructed preprocessor can have. llvm-svn: 207825
* Remove unused IncrProcessing parameter from Preprocessor ctorAlp Toker2014-05-021-1/+0
| | | | | | | Preprocessor::enableIncrementalProcessing() provides a consistent interface to enable the feature. llvm-svn: 207824
* Support 'remark' in VerifyDiagnosticConsumerTobias Grosser2014-05-012-0/+12
| | | | | | | After Diego added support for -Rpass=inliner we have now in-tree remarks which we can use to properly test this feature. llvm-svn: 207765
* do not warn about unknown pragmas in modes that do not handle them (pr9537)Lubos Lunak2014-05-012-2/+2
| | | | | | | And refactor to have just one place in code that sets up the empty pragma handlers. llvm-svn: 207758
* Drop non-cfi assembly support from clang.Rafael Espindola2014-04-301-1/+0
| | | | | | | | | | | | | | After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and always print assembly that uses cfi directives. In llvm, MC itself supports cfi since the end of 2010 (support started in r119972, is reported in the 2.9 release notes). In binutils the support has been around for much longer. It looks like support started to be added in May 2003. It is available in 2.15 (31-Aug-2011, 2.14 is from 12-Jun-2003). llvm-svn: 207602
* [PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a ↵Argyrios Kyrtzidis2014-04-292-2/+1
| | | | | | | | driver only thing and doesn't affect any language/preprocessor/etc. semantics. rdar://16714526 llvm-svn: 207570
* Reapply r207477 and r207479 without cyclic dependencyBen Langmuir2014-04-293-204/+19
| | | | | | | | Fixed by moving ProcessWarningOptions from Frontend into Basic. All of the dependencies for ProcessWarningOptions were already in Basic, so this was a small change. llvm-svn: 207549
* Revert r207477 (and r207479), "Check -Werror options during module validation"NAKAMURA Takumi2014-04-291-19/+0
| | | | | | It tried to introduce cyclic dependencies. Serialization shouldn't depend on Frontend, since Frontend depends on Serialization. llvm-svn: 207497
* Check -Werror options during module validationBen Langmuir2014-04-291-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch checks whether the diagnostic options that could lead to errors (principally -Werror) are consistent between when a module was built and when it is loaded. If there are new -Werror flags, then the module is rebuilt. In order to canonicalize the options we do this check at the level of the constructed DiagnosticsEngine, which contains the final set of diag to diagnostic level mappings. Currently we only rebuild with the new diagnostic options, but we intend to refine this in the future to include the union of the new and old flags, since we know the old ones did not cause errors. System modules are only rebuilt when -Wsystem-headers is enabled. One oddity is that unlike checking language options, we don’t perform this diagnostic option checking when loading from a precompiled header. The reason for this is that the compiler cannot rebuild the PCH, so anything that requires it to be rebuilt effectively leaks into the build system. And in this case, that would mean the build system understanding the complex relationship between diagnostic options and the underlying diagnostic mappings, which is unreasonable. Skipping the check is safe, because these options do not affect the generated AST. You simply won’t get new build errors due to changed -Werror options automatically, which is also true for non-module cases. llvm-svn: 207477
* [cleanup] Fix an 80-column violationJustin Bogner2014-04-281-1/+2
| | | | llvm-svn: 207446
* Remove unused using statement.Nico Weber2014-04-281-1/+0
| | | | llvm-svn: 207427
* Push unique_ptr ownership of ASTUnits further back into their factories.David Blaikie2014-04-251-13/+10
| | | | llvm-svn: 207237
* Don't leak _all_ directives in -verify mode. Found by LSan, PR19520.Nico Weber2014-04-241-3/+1
| | | | llvm-svn: 207079
* Don't leak invalid RegexDirectives. Probably a small part of PR19520.Nico Weber2014-04-241-4/+6
| | | | llvm-svn: 207077
* Revert the "don't leak" part of r207065, looks like the bots don't like it :-/Nico Weber2014-04-241-1/+2
| | | | | | http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/22506 llvm-svn: 207070
* Don't leak objects in load-from-ast path unless DisableFree is set.Nico Weber2014-04-241-5/+5
| | | | | | Also update a comment to match a code change that was done in r110978. llvm-svn: 207065
* Bury leaked sema pointer when reading from AST files.Nico Weber2014-04-241-2/+2
| | | | | | Should suppress several LSan reports. llvm-svn: 207056
* Quick fix for layering that broke shared library build.John Thompson2014-04-231-0/+26
| | | | llvm-svn: 207011
* Fix unused variable.John Thompson2014-04-231-1/+1
| | | | llvm-svn: 206981
* Initial implementation of -modules-earch-all option, for searching for ↵John Thompson2014-04-232-38/+104
| | | | | | symbols in non-imported modules. llvm-svn: 206977
* Attempt to fix null ASTContext in ASTUnit error pathBen Langmuir2014-04-221-1/+4
| | | | | | | | | We don't need the ASTContext for the diagnostics, only the language options, which we can get from the compiler invocation. It worries me how many categorically different states the ASTUnit class can be in depending on how it is being constructed/used. llvm-svn: 206909
* Allow adding a value to a flag in diagnostics.Diego Novillo2014-04-211-0/+3
| | | | | | | | | | | | | | | | | Summary: This allows callers of Diags.Report() to append a value to the name of the flag associated with the diagnostic. This is useful in cases like the -Rpass flag, where we want the diagnostic to show the name of the pass that matched the pattern. Instead of showing "... [-Rpass]", this allows us to show "... [-Rpass=passname]". Reviewers: rsmith CC: cfe-commits Differential Revision: http://reviews.llvm.org/D3441 llvm-svn: 206826
* Don't build modules with (submodules with) missing headersBen Langmuir2014-04-181-1/+2
| | | | | | | | Unless they are in submodules that aren't available anyway, due to requirements not being met. Also, mark children as unavailable when the parent is. llvm-svn: 206664
* Don't read CompilerInstance fields that don't exist in ASTUnitBen Langmuir2014-04-181-3/+6
| | | | | | | When transferring data from a CompilerInstance in an error path we need to consider cases where the various fields are uninitialized. llvm-svn: 206644
* Teach users of OnDiskHashTable to define hash_value and offset typesJustin Bogner2014-04-181-2/+8
| | | | | | | | This paves the way to making OnDiskHashTable work with hashes that are not 32 bits wide and to making OnDiskHashTable work very large hash tables. The LLVM change to use these types is upcoming. llvm-svn: 206640
* Remove OnDiskHashTable.h, since it's been moved to llvmJustin Bogner2014-04-181-6/+10
| | | | llvm-svn: 206637
* Revert "Move -fms-extensions predefined macros into InitPreprocessor"Reid Kleckner2014-04-161-12/+0
| | | | | | | | | | This reverts commit r206413. This was proposed before, but it's not clear if this is really a good idea: http://reviews.llvm.org/D3034 llvm-svn: 206415
* Move -fms-extensions predefined macros into InitPreprocessorReid Kleckner2014-04-161-0/+12
| | | | | | | If someone on Linux asks for -fms-extensions, there's no reason not to define the feature test macros that MSVC defines. llvm-svn: 206413
* Add support for optimization reports.Diego Novillo2014-04-162-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a new flag -Rpass=. The flag indicates the name of the optimization pass that should emit remarks stating when it made a transformation to the code. This implements the design I proposed in: https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing Other changes: - Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to print "-R" instead of "-W" in the diagnostic message. - In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation object out of the file name, line and column number. Use that location in the call to Diags.Report(). - When -Rpass is used without debug info a note is emitted alerting the user that they need to use -gline-tables-only -gcolumn-info to get this information. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3226 llvm-svn: 206401
* Honour -ivfsoverlay in ASTUnit to match clangBen Langmuir2014-04-153-33/+62
| | | | | | | This allows code indexing, etc. to use the VFS in the same way as the compiler. llvm-svn: 206309
* Add module name and module map file to -module-file-infoBen Langmuir2014-04-141-0/+7
| | | | llvm-svn: 206217
* Allow multiple modules with the same name to coexist in the module cacheBen Langmuir2014-04-143-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To differentiate between two modules with the same name, we will consider the path the module map file that they are defined by* part of the ‘key’ for looking up the precompiled module (pcm file). Specifically, this patch renames the precompiled module (pcm) files from cache-path/<module hash>/Foo.pcm to cache-path/<module hash>/Foo-<hash of module map path>.pcm In addition, I’ve taught the ASTReader to re-resolve the names of imported modules during module loading so that if the header search context changes between when a module was originally built and when it is loaded we can rebuild it if necessary. For example, if module A imports module B first time: clang -I /path/to/A -I /path/to/B ... second time: clang -I /path/to/A -I /different/path/to/B ... will now rebuild A as expected. * in the case of inferred modules, we use the module map file that allowed the inference, not the __inferred_module.map file, since the inferred file path is the same for every inferred module. llvm-svn: 206201
* Add -fmodules-strict-decluse to check that all headers are in modulesDaniel Jasper2014-04-111-1/+3
| | | | | Review: http://reviews.llvm.org/D3335 llvm-svn: 206027
* If a header is explicitly included in module A, and excluded from an umbrellaRichard Smith2014-04-081-1/+1
| | | | | | directory in module B, don't include it in module B! llvm-svn: 205762
* -fms-extensions: Don't define __PRETTY_FUNCTION__ to __FUNCTION__Reid Kleckner2014-04-071-4/+0
| | | | | | | This reverts r90596 from 2009. Having this macro definition makes Clang strictly less useful with -fms-extensions. llvm-svn: 205729
* [Frontend] If the module file lock owner have died, try to get the lock ↵Argyrios Kyrtzidis2014-04-061-22/+33
| | | | | | again. Needs llvm r205683. llvm-svn: 205684
* ARM64: initial clang support commit.Tim Northover2014-03-291-0/+5
| | | | | | | | | | | This adds Clang support for the ARM64 backend. There are definitely still some rough edges, so please bring up any issues you see with this patch. As with the LLVM commit though, we think it'll be more useful for merging with AArch64 from within the tree. llvm-svn: 205100
* Reapply "OnDiskHashTable: Use EndianStream.h to write little endian ostreams"Justin Bogner2014-03-281-20/+39
| | | | | | | | | | | | | Committed this by accident before it was done last time. Original message: Rather than rolling our own functions to write little endian data to an ostream, we can use the support in llvm's EndianStream.h. No functional change. llvm-svn: 205061
* Revert "OnDiskHashTable: Use EndianStream.h to write little endian ostreams"Justin Bogner2014-03-281-39/+20
| | | | | | This reverts commit r205044. llvm-svn: 205047
* OnDiskHashTable: Use EndianStream.h to write little endian ostreamsJustin Bogner2014-03-281-20/+39
| | | | | | | | | Rather than rolling our own functions to write little endian data to an ostream, we can use the support in llvm's EndianStream.h. No functional change. llvm-svn: 205044
* Use the new Windows environment for target detectionSaleem Abdulrasool2014-03-271-34/+44
| | | | | | | | | This follows the LLVM change to canonicalise the Windows target triple spellings. Rather than treating each Windows environment as a single entity, the environments are now modelled properly as an environment. This is a mechanical change to convert the triple use to reflect that change. llvm-svn: 204978
* Support for -Wa,-compress-debug-sections.David Blaikie2014-03-271-0/+1
| | | | | | Also, while I'm here, support -nocompress-debug-sections too. llvm-svn: 204959
* Move the -i[no-]system-prefix options from CC1Options.td to Options.td.Alexander Kornienko2014-03-261-4/+4
| | | | | | | | | | | | | | | | Summary: This allows them to be used without -cc1 the same way as -I and -isystem. Renamed the options to --system-header-prefix=/--no-system-header-prefix to avoid interference with -isystem and make the intent of the option cleaner. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3185 llvm-svn: 204775
* [msan] -fsanitize-memory-track-origins=[level] flag and docs.Evgeniy Stepanov2014-03-201-2/+2
| | | | | | | | | This change turns -fsanitize-memory-track-origins into -fsanitize-memory-track-origins=[level] flag (keeping the old one for compatibility). Possible levels are 0 (off), 1 (default) and 2 (incredibly detailed). See docs (part of this patch) for more info. llvm-svn: 204346
* Creating a printing policy for "half":Yunzhong Gao2014-03-181-0/+3
| | | | | | | | | | | | Since "half" is an OpenCL keyword and clang accepts __fp16 as an extension for other languages, error messages and metadata (and hence debug info) should refer to the half-precision floating point as "__fp16" instead of "half" when compiling for non-OpenCL languages. This patch creates a new printing policy for half in a similar manner to what is done for bool and wchar_t. Differential Revision: http://llvm-reviews.chandlerc.com/D2952 llvm-svn: 204164
* Implement the MS extension __identifier properly: take a token and strip it ofRichard Smith2014-03-151-4/+0
| | | | | | its keywordliness. llvm-svn: 203987
* [Modules] Emit the module file paths as dependencies of the PCH when we are ↵Argyrios Kyrtzidis2014-03-142-1/+10
| | | | | | | | | | | building one. This is because the PCH is tied to the module files, if one of the module files changes or gets removed the build system should re-build the PCH file. rdar://16321245 llvm-svn: 203885
* [Modules] Make sure that the synthesized file "__inferred_module.map" ↵Argyrios Kyrtzidis2014-03-141-2/+6
| | | | | | | | doesn't show up as dependency of a module file. Follow-up for rdar://15459210 llvm-svn: 203882
OpenPOWER on IntegriCloud