summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Stopgap fix for finding module for a file mapped in the VFSBen Langmuir2014-05-233-2/+15
| | | | | | | | | | | | | | | | If we lookup a path using its 'real' path first, we need to ensure that when we run header search we still use the VFS-mapped path or we will not be able to find the corresponding module for the header. The real problem is that we tie the name of a file to its underlying FileEntry, which is uniqued by inode, so we only ever get the first name it is looked up by. This doesn't work with modules, which rely on a specific file system structure. I'm hoping to have time to write up a proposal for fixing this more permanently soon, but as a stopgap this patch updates the name of the file's directory if it comes from a VFS mapping. llvm-svn: 209534
* Remove limits on the number of fix-it hints and ranges in the DiagnosticsEngine.Alexander Kornienko2014-05-221-9/+6
| | | | | | | | | | | | | | | | | | | Summary: The limits on the number of fix-it hints and ranges attached to a diagnostic are arbitrary and don't apply universally to all users of the DiagnosticsEngine. The way the limits are enforced may lead to diagnostics generating invalid sets of fixes. I suggest removing the limits, which will also simplify the implementation. Reviewers: rsmith Reviewed By: rsmith Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D3879 llvm-svn: 209468
* Update R600 datalayoutMatt Arsenault2014-05-221-1/+1
| | | | llvm-svn: 209464
* VirtualFileSystem: Fix a few directory traversal bugs in VFSWriterJustin Bogner2014-05-211-81/+92
| | | | | | | | | | | There are a couple of issues with writing VFS maps that are awkward to fix within the current mutually recursive approach. Instead, replace the algorithm with an iterative version that uses an explicit stack of directories. Includes tests for cases the old approach was tripping on. llvm-svn: 209332
* VirtualFileSystem: Fix false positives in YAMLVFSWriter::containedInJustin Bogner2014-05-201-1/+10
| | | | | | | | Checking if a path starts with another path isn't sufficient for determining if one is contained within the heirarchy of the other. We need to ensure that the substring ends at a directory boundary. llvm-svn: 209250
* VirtualFileSystem: Add YAMLVFSWriter to generate VFS mapping filesJustin Bogner2014-05-201-0/+116
| | | | | | | | | This moves the logic to write a JSON VFS mapping from the C api into VirtualFileSystem, so that we can use it internally. No functional change. llvm-svn: 209241
* Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwindJoerg Sonnenberger2014-05-131-0/+11
| | | | | | instructions. llvm-svn: 208719
* [OPENMP] Removed unnecessary enums from OpenMP constructsAlexey Bataev2014-05-121-10/+4
| | | | llvm-svn: 208516
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-101-1/+3
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
* [C++11] Use 'nullptr'.Craig Topper2014-05-0812-110/+109
| | | | llvm-svn: 208280
* [mips] Pass nan2008 info to the back-end.Matheus Almeida2014-05-071-3/+0
| | | | | | | | | | | | Summary: The initial support for NaN2008 was added to the back-end in r206396. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3448 llvm-svn: 208220
* [OPENMP] 'proc_bind' clause support - Parsing and sema analysis for OpenMP ↵Alexey Bataev2014-05-061-0/+15
| | | | | | clause 'proc_bind' llvm-svn: 208060
* [Basic/FileManager] Propagate whether a file 'IsVolatile' to the file ↵Argyrios Kyrtzidis2014-05-052-8/+15
| | | | | | | | opening functions. Needs llvm r208007. llvm-svn: 208008
* Target: fix wchar_t definition for Windows on ARMSaleem Abdulrasool2014-05-041-2/+9
| | | | | | | | Windows on ARM uses AAPCS, but has some deviations. wchar_t remains an unsigned short on WoA, which does not conform to AAPCS. Ensure that wchar_t is defined accordingly. llvm-svn: 207929
* Add support for -march=bdver4.Benjamin Kramer2014-05-021-0/+10
| | | | llvm-svn: 207848
* [ARM64/AArch64] Define the correct value for __ARM_NEON_FPBradley Smith2014-05-021-2/+2
| | | | llvm-svn: 207842
* [ARM64/AArch64] Hook up CRC32 subtarget feature to the driverBradley Smith2014-05-021-0/+14
| | | | llvm-svn: 207841
* Bitrig now supports TLS, so enable TLS support when targeting it. Patch by ↵Richard Smith2014-05-011-1/+0
| | | | | | Patrick Wildt! llvm-svn: 207812
* Reapply r207477 and r207479 without cyclic dependencyBen Langmuir2014-04-292-0/+201
| | | | | | | | 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
* LLVM supports TLS on Windows and we can use it from ClangReid Kleckner2014-04-291-2/+0
| | | | | | | | Patch by Martell Malone! Differential Revision: http://reviews.llvm.org/D3421 llvm-svn: 207470
* [mips] Support 128-bit int in N32 ABI by overriding TargetInfo::hasInt128Type()Daniel Sanders2014-04-241-0/+2
| | | | | | | | | | | | | | Summary: The condition in the base class is rather strange. It says a target has the 128-bit integer type if the size of a pointer is >= 64-bits. N32 has 32-bit pointers but 64-bit integers. I'm a bit reluctant to change this for all targets so this patch makes the method virtual and overrides it for MIPS64. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3472 llvm-svn: 207121
* [mips] Correct size_t and ptrdiff_t for N32.Daniel Sanders2014-04-241-10/+22
| | | | | | | | | | | | | | Summary: Correct size_t to be unsigned int and ptrdiff_t to be signed long. The types were the correct size before this change but the exact type matters for name mangling and exception handling in C++. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3470 llvm-svn: 207093
* Do not print inferred submodules explicitly in __inferred_module.mapBen Langmuir2014-04-231-4/+6
| | | | | | | | | | | | | | Otherwise including a header in your source file that is not included by framework's umbrella header will silently add an empty submodule with that name. is automatically translated to @import Foo.NotInModule; which then would have succeeded because the inferred module map contained an empty submodule called NotInModule. llvm-svn: 207024
* [ARM64] Change inline assembly constraints to be more lax, to match the ↵James Molloy2014-04-231-30/+21
| | | | | | | | behaviour of Clang/AArch64 and GCC. GCC allows sub-64bit values to use the 'r' register constraint. llvm-svn: 206963
* [OPENMP] parsing 'linear' clause (for directive 'omp simd')Alexander Musman2014-04-221-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D3272 llvm-svn: 206891
* Try to fix bad Twine usage in r206791 with std::stringReid Kleckner2014-04-211-1/+3
| | | | | | | I'm pretty sure I was referencing destroyed temporaries here. I'm open to suggestions on how to write this better. llvm-svn: 206804
* MinGW: Define __stdcall&co when -fms-extensions is disabledReid Kleckner2014-04-211-22/+27
| | | | | | | | | | This is for compatibility with GCC. Reviewers: asl Differential Revision: http://reviews.llvm.org/D3444 llvm-svn: 206791
* Initialize clang::Module::IsMissingRequirement. Fix msan issue and hopefully ↵Richard Smith2014-04-211-6/+6
| | | | | | some builder failures. llvm-svn: 206736
* Fix a hole with nested unavailable submodules from r206664Ben Langmuir2014-04-181-3/+4
| | | | | | | | If a module doesn't meet a requirement, neither do its submodules. If we don't propogate that, we might think it's an error to be missing a header in one of those submodules. llvm-svn: 206673
* Don't build modules with (submodules with) missing headersBen Langmuir2014-04-181-0/+5
| | | | | | | | 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
* Add more constness to module-related APIsDmitri Gribenko2014-04-181-1/+1
| | | | llvm-svn: 206595
* [ARM64] Teach Targets.cpp about Cortex-A53 and Cortex-A57, and enable more ↵James Molloy2014-04-171-0/+1
| | | | | | tests. llvm-svn: 206463
* Revert "Move -fms-extensions predefined macros into InitPreprocessor"Reid Kleckner2014-04-161-0/+13
| | | | | | | | | | 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-13/+0
| | | | | | | 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-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ARM64] Allow the disabling of NEON and crypto instructions. Update tests to ↵James Molloy2014-04-161-18/+27
| | | | | | pass -target-feature +neon. llvm-svn: 206394
* [ARM64] Fix up predefines, including adding big endian support to Targets.cppJames Molloy2014-04-161-21/+78
| | | | llvm-svn: 206390
* [Allocator] Make the ContentCache object actually carry the 8-byteChandler Carruth2014-04-151-12/+4
| | | | | | | | | alignment constraint rather than using the allocator function's over alignment "feature". This was the only use of the "feature" which I plan to remove next. =] Attaching the alignment to the type seems cleaner and more principled anyways. llvm-svn: 206324
* Allow multiple modules with the same name to coexist in the module cacheBen Langmuir2014-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [SystemZ] Don't indent SystemZTargetInfo relative to its namespaceRichard Sandiford2014-04-101-91/+91
| | | | | | Whitespace only. No functional change intended. llvm-svn: 205960
* Driver: add target definition for Windows on ARMSaleem Abdulrasool2014-04-041-5/+96
| | | | | | | | | This introduces the definitions needed for the Windows on ARM target. Add target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI environment. The Visual Studio definitions correspond to the definitions provided by Visual Studio 2012. llvm-svn: 205650
* Basic: rename VisualStudio to WindowsSaleem Abdulrasool2014-04-041-6/+6
| | | | | | | | Visual Studio is the Integrated Development Environment. The toolchain is generally referred to MSVC. Rename the target information to be more precise as per the recommendation of Reid Kleckner. llvm-svn: 205609
* Post-commit review coding style change: renaming HasAttribute to ↵Aaron Ballman2014-03-311-1/+1
| | | | | | hasAttribute. No functional changes. llvm-svn: 205201
* Reapplying r204952 a second time.Aaron Ballman2014-03-312-0/+18
| | | | | | | | | | Clean up the __has_attribute implementation without modifying its behavior. Replaces the tablegen-driven AttrSpellings.inc, which lived in the lexing layer with AttrHasAttributeImpl.inc, which lives in the basic layer. Updates the preprocessor to call through to this new functionality which can take additional information into account (such as scopes and syntaxes). Expose the ability for parts of the compiler to ask whether an attribute is supported for a given spelling (including scope), syntax, triple and language options. llvm-svn: 205181
* [OPENMP] Implemented 'copyin' clauseAlexey Bataev2014-03-311-0/+2
| | | | llvm-svn: 205164
* [PowerPC] Make -pg generate calls to _mcount not mcountHal Finkel2014-03-301-0/+10
| | | | | | | | | At least on REL6 (Linux/glibc 2.12), the proper symbol for generating gprof data is _mcount, not mcount. Prior to this change, compiling with -pg would generate linking errors (because of unresolved references to mcount), after this change -pg seems at least minimally functional. llvm-svn: 205144
* ARM64: initial clang support commit.Tim Northover2014-03-291-6/+311
| | | | | | | | | | | 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
* Add ARM big endian Target (armeb, thumbeb)Christian Pirker2014-03-281-33/+110
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D3096 llvm-svn: 205008
* Use the new Windows environment for target detectionSaleem Abdulrasool2014-03-272-12/+24
| | | | | | | | | 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
* Reverting r204968 and r204969; while more build bots are happy with the ↵Aaron Ballman2014-03-272-18/+0
| | | | | | results, some still have link errors. llvm-svn: 204974
OpenPOWER on IntegriCloud