summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Wdeprecated: StoredDiagnostics are stored in a SmallVector, so make sure ↵David Blaikie2015-08-131-4/+0
| | | | | | | | | | | they're copy/movable Removing the no-op dtor makes these objects safely implicitly copyable/movable/etc. (& tidy up the ctor, while I'm here) llvm-svn: 244971
* Removed one too many braces.Brad Smith2015-08-131-0/+1
| | | | llvm-svn: 244962
* [SPARC] Fix types of size_t, intptr_t, and ptrdiff_t on OpenBSD.Brad Smith2015-08-131-7/+10
| | | | llvm-svn: 244961
* [Modules] Add Darwin-specific compatibility module map parsing hacksBen Langmuir2015-08-131-0/+9
| | | | | | | | | | | | | | | | This preserves backwards compatibility for two hacks in the Darwin system module map files: 1. The use of 'requires excluded' to make headers non-modular, which should really be mapped to 'textual' now that we have this feature. 2. Silently removes a bogus cplusplus requirement from IOKit.avc. Once we start diagnosing missing requirements and headers on auto-imports these would have broken compatibility with existing Darwin SDKs. llvm-svn: 244912
* Add SourceManager::dump() to dump the current set of SLocEntries.Richard Smith2015-08-131-0/+57
| | | | llvm-svn: 244852
* [modules] If loading a .pcm file would cause us to run out of source ↵Richard Smith2015-08-121-1/+3
| | | | | | locations, attempt to fail more gracefully. (No test; this requires >= 4GB of preprocessed input...) llvm-svn: 244822
* Rangify some for loops; NFC.Aaron Ballman2015-08-121-6/+5
| | | | llvm-svn: 244749
* [MIPS] Use arch values for lock-free atomic operationsPetar Jovanovic2015-08-111-2/+1
| | | | | | | | | Let NaClMips32ELTargetInfo inherit arch values for maximum width lock-free atomic operations. Differential Revision: http://reviews.llvm.org/D11949 llvm-svn: 244675
* Update a comment to be more descriptive.Eric Christopher2015-08-071-1/+1
| | | | llvm-svn: 244346
* This patch commits OpenMP 4 target device clausesMichael Wong2015-08-071-0/+2
| | | | | | | This is committed on behalf of Kelvin Li http://reviews.llvm.org/D11469?id=31227 llvm-svn: 244325
* Make sure the Features field of the Builtin Info struct is always ↵Craig Topper2015-08-072-36/+44
| | | | | | | | initialized. Silences -Wmissing-field-initializers. While there convert 0 in the BUILTIN macros to nullptr. llvm-svn: 244307
* Make 'arm' cover both 32 and 64 bit architecutresBen Langmuir2015-08-071-0/+2
| | | | | | | | | | | | | | | | ... and add aarch32 to specifically refer to the 32-bit ones. Previously, 'arm' meant only 32-bit architectures and there was no way for a module to build with both 32 and 64 bit ARM architectures. Now a module that is intended to work on both architectures can specify requires arm whereas a module only for 32-bit platforms can say requires aarch32 and just like before, 64-bit only can say requires aarch64 llvm-svn: 244306
* Continue the work from r243908 by adding a Features field to Builtin::InfoEric Christopher2015-08-061-2/+4
| | | | | | | | so that we can populate it on a per-target basis with required features. Future commits will start using this information for warnings. llvm-svn: 244286
* Rename the non-coding style conformant functions in namespace BuiltinsEric Christopher2015-08-061-9/+9
| | | | | | to match the rest of their brethren and reformat the bits that need it. llvm-svn: 244186
* Rename DescriptionString -> DataLayoutString as it matches the actualEric Christopher2015-08-052-86/+84
| | | | | | use of the string. llvm-svn: 244178
* Remove unused header includes.Eric Christopher2015-08-051-1/+0
| | | | llvm-svn: 244131
* Rename builtin_lang -> Langs to match the rest of the code a bit better.Eric Christopher2015-08-051-9/+10
| | | | llvm-svn: 244126
* Remove unused function GetBuiltinNames.Eric Christopher2015-08-051-13/+0
| | | | llvm-svn: 244125
* [FileManager] Use StringRef::copy to store canonical paths.Benjamin Kramer2015-08-041-9/+3
| | | | | | No functional change intended. llvm-svn: 243970
* [modules] Fix issue where building a module from a relative path when ↵Argyrios Kyrtzidis2015-07-311-2/+14
| | | | | | | | | -working-directory option is set, results in error. The error was "module '<name>' was built in directory '<path>' but now resides in directory '<path>' rdar://21330027 llvm-svn: 243718
* Add support for System z vector language extensionsUlrich Weigand2015-07-303-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The z13 vector facility has an associated language extension, closely modeled on AltiVec/VSX. The main differences are: - vector long, vector float and vector pixel are not supported - vector long long and vector double are supported (like VSX) - comparison operators return a vector rather than a scalar integer - shift operators behave like the OpenCL shift operators - vector bool is only supported as argument to certain operators; some operators allow mixing a bool with a non-bool vector This patch adds clang support for the extension. It is closely modelled on the AltiVec support. Similarly to the -faltivec option, there's a new -fzvector option to enable the extensions (as well as an -mzvector alias for compatibility with GCC). There's also a separate LangOpt. The extension as implemented here is intended to be compatible with the -mzvector extension recently implemented by GCC. Based on a patch by Richard Sandiford. Differential Revision: http://reviews.llvm.org/D11001 llvm-svn: 243642
* Add a comment explaining differing Windows behavior.Sean Silva2015-07-301-1/+7
| | | | llvm-svn: 243625
* Attempt to make clang-x64-ninja-win7 happy.Sean Silva2015-07-301-6/+8
| | | | | | | It looks like we were somehow relying somewhere on removing 'foo/./bar' but *not* 'foo/../foo/bar'. Currently investigating. llvm-svn: 243600
* Avoid failure to canonicalize '..'.Sean Silva2015-07-301-8/+11
| | | | | | | | | | | | | | Also fix completely broken and untested code which was hiding the primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op. I ran into this in the wild. It was causing failures in our SDK build. Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this is a step in the right direction, and fixes an obviously broken case. In some sense the test case I've added here is an integration test. We should have these routines thoroughly unit tested in llvm::sys::fs. llvm-svn: 243597
* RegParmMax must be 0 for AArch64, as the regparm function attribute is not ↵Kristof Beyls2015-07-281-1/+0
| | | | | | supported on AArch64. llvm-svn: 243417
* [Targets] Define _M_AMD64 and _M_X64 to a more appropriate valueDavid Majnemer2015-07-261-2/+2
| | | | | | We used to define them to 1, we should have defined them to 100. llvm-svn: 243255
* Correct x86_64 Android fp128 mangled nameChih-Hung Hsieh2015-07-241-0/+4
| | | | | | | | | | These changes are for Android x86_64 targets to be compatible with current Android g++. https://llvm.org/bugs/show_bug.cgi?id=23897 Use 'g' and 'Cg' for "long double" and "long double _Complex" mangled type names. Differential Revision: http://reviews.llvm.org/D11466 llvm-svn: 243133
* Test commit.Chih-Hung Hsieh2015-07-241-3/+3
| | | | llvm-svn: 243125
* [MSVC Compatibility] Use a better predicate for __BOOL_DEFINEDDavid Majnemer2015-07-221-1/+2
| | | | | | | Instead of using CPlusPlus, use Bool. No functionality change is intended, it just makes things a tad bit more clear. llvm-svn: 242957
* Add cygwin x86_64 target.Yaron Keren2015-07-221-0/+27
| | | | | | | | Patch by Martell Malone! http://reviews.llvm.org/D11349 llvm-svn: 242914
* ARM: actually define __ARM_ARCH_7S__ for the armv7s sliceTim Northover2015-07-211-1/+2
| | | | | | | We ended up with the wrong predefine after the recent TargetParser shuffle, and I accidentally solidified it with a test. This should fix it. llvm-svn: 242841
* Commit for http://reviews.llvm.org/D10765Michael Wong2015-07-211-0/+10
| | | | | | | for OpenMP 4 target data directive parsing and sema. This commit is on behalf of Kelvin Li. llvm-svn: 242785
* Ignore the "novtable" declspec when not using the Microsoft C++ ABI.Bob Wilson2015-07-201-2/+2
| | | | | | | | | | | | | | Clang used to silently ignore __declspec(novtable). It is implemented now, but leaving the vtable uninitialized does not work when using the Itanium ABI, where the class layout for complex class hierarchies is stored in the vtable. It might be possible to honor the novtable attribute in some simple cases and either report an error or ignore it in more complex situations, but it’s not clear if that would be worthwhile. There is also value in having a simple and predictable behavior, so this changes clang to simply ignore novtable when not using the Microsoft C++ ABI. llvm-svn: 242730
* [X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints ↵Alexey Bataev2015-07-201-21/+51
| | | | | | | | | (patch by Alexey Frolov) Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’). Differential Revision: http://reviews.llvm.org/D10536 llvm-svn: 242665
* basic: default to MSVC on WindowsSaleem Abdulrasool2015-07-171-6/+3
| | | | | | | | | | | The "armv7-windows", "i686-windows", and "x86_64-windows" targets should be equivalent to the MSVC environment. This was previously discussed when the triples for Windows werw canonicalised. Im not sure how this was overlooked. This fixes the emission of non-COFF formats on Windows. Thanks to ki9a for reporting this issue over IRC! llvm-svn: 242574
* R600: Add macro defs for all supported OpenCL extensionsTom Stellard2015-07-171-1/+9
| | | | llvm-svn: 242523
* Fix android build after r242514Tamas Berghammer2015-07-171-1/+1
| | | | | | | On android std::to_string isn't supported. Replace it with llvm::utostr. llvm-svn: 242516
* -Refactored ARMTargetInfo in order to use the API of TargetParserAlexandros Lamprineas2015-07-171-156/+150
| | | | | | | | | | | for extracting target specific information. -Patches commit r241343: case 'armv7l' was unhandled in ARMTargetInfo::getCPUAttr(), and thus it was returning invalid characters for macro definition. Change-Id: I1a0972e5ff5529cd17376c6562047bab8b4da32c Phabricator: http://reviews.llvm.org/D10839 llvm-svn: 242514
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-171-1/+3
| | | | | | | | | | | | | - 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
* Allow __builtin_setjmp/__builtin_longjmp on ARMMatthias Braun2015-07-171-0/+4
| | | | | | | | The problems in the llvm target got fixed in r242481 and r242482. Related to rdar://20544153, rdar://20660786 llvm-svn: 242489
* [Targets] Define __BOOL_DEFINED for Windows targets in C++ modeDavid Majnemer2015-07-151-0/+2
| | | | | | | | | | MSVC 4.2 didn't have bool as a builtin type but MSVC 5.0 does. When they added it, they added a macro (__BOOL_DEFINED) which allows build scripts and the like to know if they should provide their own bool. Clang always supports bool as a builtin type in C++ mode. llvm-svn: 242307
* Add support for armv7-windows-gnu targets to the clang front end.Yaron Keren2015-07-151-0/+43
| | | | | | | | | http://reviews.llvm.org/D11071 Patch by Martell Malone Reviewed by Reid Kleckner llvm-svn: 242292
* Add a "maximum TLS alignment" characteristic to the target info, so itPaul Robinson2015-07-142-0/+3
| | | | | | | | | | can be different from the normal variable maximum. Add an error diagnostic for when TLS variables exceed maximum TLS alignment. Currenty only PS4 sets an explicit maximum TLS alignment. Patch by Charles Li! llvm-svn: 242198
* Pull trivial SanitizerSet methods into the header.Benjamin Kramer2015-07-141-25/+0
| | | | | | Inlining them is always preferable to a call. NFC. llvm-svn: 242154
* [Modules] Allow missing header before a missing requirementBen Langmuir2015-07-131-7/+11
| | | | | | | | | | | And make the module unavailable without breaking any parent modules. If there's a missing requirement after we've already seen a missing header, still update the IsMissingRequiement bit correctly. Also, diagnose missing requirements before missing headers, since the existence of the header is moot if there are missing requirements. llvm-svn: 242055
* Fix a couple of typos: specifc->specific.Eric Christopher2015-07-101-1/+1
| | | | llvm-svn: 241924
* Add missing builtins to altivec.h for ABI compliance (vol. 3)Nemanja Ivanovic2015-07-101-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D10972 Fix for the handling of dependent features that are enabled by default on some CPU's (such as -mvsx, -mpower8-vector). Also provides a number of new interfaces or fixes existing ones in altivec.h. Changed signatures to conform to ABI: vector short vec_perm(vector signed short, vector signed short, vector unsigned char) vector int vec_perm(vector signed int, vector signed int, vector unsigned char) vector long long vec_perm(vector signed long long, vector signed long long, vector unsigned char) vector signed char vec_sld(vector signed char, vector signed char, const int) vector unsigned char vec_sld(vector unsigned char, vector unsigned char, const int) vector bool char vec_sld(vector bool char, vector bool char, const int) vector unsigned short vec_sld(vector unsigned short, vector unsigned short, const int) vector signed short vec_sld(vector signed short, vector signed short, const int) vector signed int vec_sld(vector signed int, vector signed int, const int) vector unsigned int vec_sld(vector unsigned int, vector unsigned int, const int) vector float vec_sld(vector float, vector float, const int) vector signed char vec_splat(vector signed char, const int) vector unsigned char vec_splat(vector unsigned char, const int) vector bool char vec_splat(vector bool char, const int) vector signed short vec_splat(vector signed short, const int) vector unsigned short vec_splat(vector unsigned short, const int) vector bool short vec_splat(vector bool short, const int) vector pixel vec_splat(vector pixel, const int) vector signed int vec_splat(vector signed int, const int) vector unsigned int vec_splat(vector unsigned int, const int) vector bool int vec_splat(vector bool int, const int) vector float vec_splat(vector float, const int) Added a VSX path to: vector float vec_round(vector float) Added interfaces: vector signed char vec_eqv(vector signed char, vector signed char) vector signed char vec_eqv(vector bool char, vector signed char) vector signed char vec_eqv(vector signed char, vector bool char) vector unsigned char vec_eqv(vector unsigned char, vector unsigned char) vector unsigned char vec_eqv(vector bool char, vector unsigned char) vector unsigned char vec_eqv(vector unsigned char, vector bool char) vector signed short vec_eqv(vector signed short, vector signed short) vector signed short vec_eqv(vector bool short, vector signed short) vector signed short vec_eqv(vector signed short, vector bool short) vector unsigned short vec_eqv(vector unsigned short, vector unsigned short) vector unsigned short vec_eqv(vector bool short, vector unsigned short) vector unsigned short vec_eqv(vector unsigned short, vector bool short) vector signed int vec_eqv(vector signed int, vector signed int) vector signed int vec_eqv(vector bool int, vector signed int) vector signed int vec_eqv(vector signed int, vector bool int) vector unsigned int vec_eqv(vector unsigned int, vector unsigned int) vector unsigned int vec_eqv(vector bool int, vector unsigned int) vector unsigned int vec_eqv(vector unsigned int, vector bool int) vector signed long long vec_eqv(vector signed long long, vector signed long long) vector signed long long vec_eqv(vector bool long long, vector signed long long) vector signed long long vec_eqv(vector signed long long, vector bool long long) vector unsigned long long vec_eqv(vector unsigned long long, vector unsigned long long) vector unsigned long long vec_eqv(vector bool long long, vector unsigned long long) vector unsigned long long vec_eqv(vector unsigned long long, vector bool long long) vector float vec_eqv(vector float, vector float) vector float vec_eqv(vector bool int, vector float) vector float vec_eqv(vector float, vector bool int) vector double vec_eqv(vector double, vector double) vector double vec_eqv(vector bool long long, vector double) vector double vec_eqv(vector double, vector bool long long) vector bool long long vec_perm(vector bool long long, vector bool long long, vector unsigned char) vector double vec_round(vector double) vector double vec_splat(vector double, const int) vector bool long long vec_splat(vector bool long long, const int) vector signed long long vec_splat(vector signed long long, const int) vector unsigned long long vec_splat(vector unsigned long long, vector bool int vec_sld(vector bool int, vector bool int, const int) vector bool short vec_sld(vector bool short, vector bool short, const int) llvm-svn: 241904
* Revert r241770 and add Basic to the dependencies of clang-check instead.Adrian Prantl2015-07-091-0/+3
| | | | | | PR24067. llvm-svn: 241782
* Move the definition of ~PCHContainerOperations from Basic into Frontend.Adrian Prantl2015-07-091-3/+0
| | | | | | Fixes PR24067. llvm-svn: 241770
* [MIPS] Add support for direct-to-nacl in ClangPetar Jovanovic2015-07-081-1/+14
| | | | | | | | | | | For Mips direct-to-nacl, the goal is to be close to le32 front-end and use Mips32EL backend. This patch defines new NaClMips32ELTargetInfo and modifies it slightly to be close to le32. It also adds necessary parts, inline with ARM and X86. Differential Revision: http://reviews.llvm.org/D10739 llvm-svn: 241678
OpenPOWER on IntegriCloud