summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a range-based for loop. Use std::end instead of pointer+array_lengthof. NFCCraig Topper2015-10-171-11/+9
| | | | llvm-svn: 250617
* Further increase helfulness of assert messageRichard Barton2015-10-161-4/+1
| | | | | | | | | If you increase the number of diags of a particular type by one more than the number available you get the nice assert message. If you do it by two more than available you get the old non-helpful message. Combining the two makes sense I think. llvm-svn: 250546
* [X86] Add fxsr feature name for fxsave/fxrestore builtins.Craig Topper2015-10-161-0/+18
| | | | llvm-svn: 250498
* Add support for CloudABI/aarch64.Ed Schouten2015-10-151-0/+2
| | | | | | | The core C library has already been ported over to aarch64 successfully, meaning there is no reason to hold this change back. llvm-svn: 250416
* [X86] Add command line switches for xsave/xsaveopt/xsavec/xsaves. Macro ↵Craig Topper2015-10-151-1/+48
| | | | | | defines for the same. And add the flags to correct CPU names. llvm-svn: 250368
* [X86] Use C+11 non-static data member initialization to initialize all the ↵Craig Topper2015-10-141-34/+30
| | | | | | | | X86 feature controls. NFC This simplifies the constructor initialization list and makes it less likely a feature flag will be forgotten there. llvm-svn: 250348
* [VFS] Let the user decide if they want path normalization.Benjamin Kramer2015-10-121-16/+30
| | | | | | | | | | | | | | This is a more principled version of what I did earlier. Path normalization is generally a good thing, but may break users in strange environments, e. g. using lots of symlinks. Let the user choose and default it to on. This also changes adding a duplicated file into returning an error if the file contents are different instead of an assertion failure. Differential Revision: http://reviews.llvm.org/D13658 llvm-svn: 250060
* [VFS] Don't try to be heroic with '.' in paths.Benjamin Kramer2015-10-121-8/+11
| | | | | | | Actually the only special path we have to handle is ./foo, the rest is tricky to get right so do the same thing as the existing YAML vfs here. llvm-svn: 250036
* [VFS] remove handling of '..' for now.Benjamin Kramer2015-10-121-2/+2
| | | | | | | | | This can fail badly if we're overlaying a real file system and there are symlinks there. Just keep the path as-is for now. This essentially reverts r249830. llvm-svn: 250021
* Fix whitespace, 80-column violations, embedded tabs for theEric Christopher2015-10-092-25/+28
| | | | | | TargetInfo class. llvm-svn: 249872
* constify the feature vector going into initFeatureMap as it shouldn'tEric Christopher2015-10-092-27/+33
| | | | | | change the set of features. llvm-svn: 249871
* [VFS] Rename RedirectingFS internals to avoid collisions with public clang ↵Benjamin Kramer2015-10-091-24/+29
| | | | | | | | classes Hopefully fixes the MSVC build. NFC intended. llvm-svn: 249832
* [VFS] Just normalize away .. and . in paths for in-memory file systems.Benjamin Kramer2015-10-091-17/+10
| | | | | | This simplifies the code and gets us support for .. for free. llvm-svn: 249830
* Use Triple.isAndroid() where possible.Evgeniy Stepanov2015-10-081-1/+1
| | | | llvm-svn: 249751
* Handle sse turning on mmx, but no -mmx not turning off SSE.Eric Christopher2015-10-081-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationale : // sse3 __m128d test_mm_addsub_pd(__m128d A, __m128d B) { return _mm_addsub_pd(A, B); } // mmx void shift(__m64 a, __m64 b, int c) { _mm_slli_pi16(a, c); _mm_slli_pi32(a, c); _mm_slli_si64(a, c); _mm_srli_pi16(a, c); _mm_srli_pi32(a, c); _mm_srli_si64(a, c); _mm_srai_pi16(a, c); _mm_srai_pi32(a, c); } clang -msse3 -mno-mmx file.c -c For this code we should be able to explicitly turn off MMX without affecting the compilation of the SSE3 function and then diagnose and error on compiling the MMX function. This is a preparatory patch to the actual diagnosis code which is coming in a future patch. This sets us up to have the correct information where we need it and verifies that it's being emitted for the backend to handle. llvm-svn: 249733
* Migrate most feature map inclusion to initFeatureMap for the x86 target soEric Christopher2015-10-081-17/+21
| | | | | | | | that we can build up an accurate set of features rather than relying on TargetInfo initialization via handleTargetFeatures to munge the list of features. llvm-svn: 249732
* Simplify DefaultCPU in ARMTargetInfoRenato Golin2015-10-081-19/+11
| | | | | | | | | | | | | | | | | | Simplifying the convoluted CPU handling in ARMTargetInfo. The default base CPU on ARM is ARM7TDMI, arch ARMv4T, and ARMTargetInfo had a different one. This wasn't visible from Clang because the driver selects the defaults and sets the Arch/CPU features directly, but the constructor depended on the CPU, which was never used. This patch corrects the mistake and greatly simplifies how CPU is dealt with (essentially by removing the duplicated DefaultCPU field). Tests updated. llvm-svn: 249699
* [VFS] Port driver tool chains to VFS.Benjamin Kramer2015-10-071-0/+5
| | | | | | | There are still some loose ends here but it's sufficient so we can detect GCC headers that are inside of a VFS. llvm-svn: 249556
* [VFS] Refactor VFSFromYAML a bit.Benjamin Kramer2015-10-071-60/+57
| | | | | | | | | | - Rename it to RedirectingFileSystem. This is what it does, YAML is just a serialization format for it. - Consistently use unique_ptr for memory management. No functional change intended. llvm-svn: 249532
* [VFS] Also drop '.' when adding files to an in-memory FS.Benjamin Kramer2015-10-071-0/+7
| | | | | | Otherwise we won't be able to find them later. llvm-svn: 249525
* [VFS] Put the incoming name in the file status to make InMemoryFS behave ↵Benjamin Kramer2015-10-061-1/+1
| | | | | | more like a real FS. llvm-svn: 249409
* [VFS] Transition clang-format to use an in-memory FS.Benjamin Kramer2015-10-061-0/+16
| | | | | | | | | | | Apart from being cleaner this also means that clang-format no longer has access to the host file system. This isn't necessary because clang-format never reads includes :) Includes minor tweaks and bugfixes found in the VFS implementation while running clang-format tests. llvm-svn: 249385
* Remove duplicated default arguments. NFC.Benjamin Kramer2015-10-051-10/+8
| | | | llvm-svn: 249355
* [VFS] Fix the windows build by including the right headers.Benjamin Kramer2015-10-051-0/+8
| | | | llvm-svn: 249319
* [VFS] Fix compilation on systems where time_t is not int64_t.Benjamin Kramer2015-10-051-4/+4
| | | | | | No functional change intended. llvm-svn: 249318
* [VFS] Add working directories to every virtual file system.Benjamin Kramer2015-10-051-8/+65
| | | | | | | | | | | | For RealFileSystem this is getcwd()/chdir(), the synthetic file systems can make up one for themselves. OverlayFileSystem now synchronizes the working directories when a new FS is added to the overlay or the overlay working directory is set. This allows purely artificial file systems that have zero ties to the underlying disks. Differential Revision: http://reviews.llvm.org/D13430 llvm-svn: 249316
* [VFS] Add an in-memory file system implementation.Benjamin Kramer2015-10-051-0/+246
| | | | | | | | | | This is a simple file system tree of memory buffers that can be filled by a client. In conjunction with an OverlayFS it can be used to make virtual files accessible right next to physical files. This can be used as a replacement for the virtual file handling in FileManager and which I intend to remove eventually. llvm-svn: 249315
* [VFS] Move class out of method so it looks less like Java.Benjamin Kramer2015-10-051-26/+28
| | | | | | No functionality change. llvm-svn: 249314
* [VFS] Remove setName from the file interface.Benjamin Kramer2015-10-051-36/+62
| | | | | | | This streamlines the interface a bit and makes Status more immutable. No functional change intended. llvm-svn: 249310
* The Driver does not set the +strict-align flag when targetingAlexandros Lamprineas2015-10-051-4/+0
| | | | | | | | [ARM] armv6m + netbsd. Tests are misssing for armv6m + darwin as well. Differential Revision: http://reviews.llvm.org/D13217 llvm-svn: 249308
* [mips][p5600] Add -mcpu=p5600 option.Daniel Sanders2015-10-051-0/+1
| | | | | | | | | | | | Summary: Reviewers: vkalintiris, atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12234 llvm-svn: 249306
* Add -f[no-]declspec to control recognition of __declspec as a keywordSaleem Abdulrasool2015-10-041-4/+1
| | | | | | | | | | | | | | | 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-031-3/+3
| | | | | | +couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
* Replace double-negated !SourceLocation.isInvalid() with ↵Yaron Keren2015-10-031-1/+1
| | | | | | SourceLocation.isValid(). llvm-svn: 249228
* [OpenMP] Capture global variables in target regions.Samuel Antao2015-10-021-0/+4
| | | | | | | | | All global variables that are not enclosed in a declare target region must be captured in the target region as local variables do. Currently, there is no support for declare target, so this patch adds support for capturing all the global variables used in a the target region. llvm-svn: 249154
* Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] ↵Alexandros Lamprineas2015-10-021-6/+6
| | | | | | | | targets. Differential Revision: http://reviews.llvm.org/D12633 llvm-svn: 249140
* [PowerPC] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros on all PPC coresHal Finkel2015-10-011-8/+6
| | | | | | | | | | | | We support all __sync_val_compare_and_swap_* builtins (only 64-bit on 64-bit targets) on all cores, and should define the corresponding __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros, just as GCC does. As it turns out, this is really important because they're needed to prevent a bad ODR violation with libstdc++'s std::shared_ptr (this is well explained in PR12730). We were doing this only for P8, but this is necessary on all PPC systems. llvm-svn: 249009
* [CUDA] 32-bit NVPTX should have 32-bit long type.Artem Belevich2015-09-281-0/+1
| | | | | | | | | Currently it's 64-bit which will lead to mismatch between host and device code if we compile for i386. Differential Revision: http://reviews.llvm.org/D13181 llvm-svn: 248753
* [OPENMP 4.1] Add 'simd' clause for 'ordered' directive.Alexey Bataev2015-09-281-0/+2
| | | | | | | | | | | Parsing and sema analysis for 'simd' clause in 'ordered' directive. Description If the simd clause is specified, the ordered regions encountered by any thread will use only a single SIMD lane to execute the ordered regions in the order of the loop iterations. Restrictions An ordered construct with the simd clause is the only OpenMP construct that can appear in the simd region llvm-svn: 248696
* [OPENMP 4.1] Add 'threads' clause for '#pragma omp ordered'.Alexey Bataev2015-09-251-1/+12
| | | | | | | | OpenMP 4.1 extends format of '#pragma omp ordered'. It adds 3 additional clauses: 'threads', 'simd' and 'depend'. If no clause is specified, the ordered construct behaves as if the threads clause had been specified. If the threads clause is specified, the threads in the team executing the loop region execute ordered regions sequentially in the order of the loop iterations. The loop region to which an ordered region without any clause or with a threads clause binds must have an ordered clause without the parameter specified on the corresponding loop directive. llvm-svn: 248569
* Move the darwin define static function to be close to the OS define.Eric Christopher2015-09-241-24/+23
| | | | llvm-svn: 248539
* Use just one larger anonymous namespace instead of a lot of smaller ones.Eric Christopher2015-09-241-15/+0
| | | | llvm-svn: 248538
* Recommit r248154: [ARM] Handle DSP feature as an ArchExtKindArtyom Skrobov2015-09-241-10/+8
| | | | | | | | | | | | | | | | Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in a hand-rolled tricky condition block in lib/Basic/Targets.cpp, with a FIXME: attached. http://reviews.llvm.org/D12937 moved the handling of the DSP feature over to ARMTargetParser.def in LLVM, to be in line with other architecture extensions. This is the corresponding patch to clang, to clear the FIXME: and update the tests. Differential Revision: http://reviews.llvm.org/D12938 llvm-svn: 248521
* Improve the printing of ranges when macros are involved.Richard Trieu2015-09-241-2/+7
| | | | | | | | | | | | 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-221-3/+16
| | | | | | | | | | | | * 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
* Revert "[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def"James Molloy2015-09-211-5/+5
| | | | | | | | This was committed without the code review (http://reviews.llvm.org/D12938) being approved. This reverts commit r248154. llvm-svn: 248173
* [ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.defArtyom Skrobov2015-09-211-5/+5
| | | | | | | | | | | | | | | | Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in a hand-rolled tricky condition block in lib/Basic/Targets.cpp, with a FIXME: attached. http://reviews.llvm.org/D12937 moved the handling of +t2dsp over to ARMTargetParser.def in LLVM, to be in line with other architecture extensions. This is the corresponding patch to clang, to clear the FIXME: and update the tests. Differential Revision: http://reviews.llvm.org/D12938 llvm-svn: 248154
* Reduce indentation in the TargetInfo implementations and fix upEric Christopher2015-09-181-369/+362
| | | | | | a couple of macro builtin redefines. llvm-svn: 248046
* [OPENMP 4.0] Add 'if' clause for 'cancel' directive.Alexey Bataev2015-09-181-1/+10
| | | | | | Add parsing, sema analysis and codegen for 'if' clause in 'cancel' directive. llvm-svn: 247976
* Support __builtin_ms_va_list.Charles Davis2015-09-172-0/+4
| | | | | | | | | | | | | | | | | | Summary: This change adds support for `__builtin_ms_va_list`, a GCC extension for variadic `ms_abi` functions. The existing `__builtin_va_list` support is inadequate for this because `va_list` is defined differently in the Win64 ABI vs. the System V/AMD64 ABI. Depends on D1622. Reviewers: rsmith, rnk, rjmccall CC: cfe-commits Differential Revision: http://reviews.llvm.org/D1623 llvm-svn: 247941
OpenPOWER on IntegriCloud