summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-0/+3
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-3/+0
| | | | | | failures. llvm-svn: 241642
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-071-0/+3
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
* Implement the Objective-C __kindof type qualifier.Douglas Gregor2015-07-071-1/+3
| | | | | | | | | | The __kindof type qualifier can be applied to Objective-C object (pointer) types to indicate id-like behavior, which includes implicit "downcasting" of __kindof types to subclasses and id-like message-send behavior. __kindof types provide better type bounds for substitutions into unspecified generic types, which preserves more type information. llvm-svn: 241548
* Revert "Refactored ARMTargetInfo in order to use the API of ↵Renato Golin2015-07-031-78/+118
| | | | | | | | llvm/lib/Support/TargetParser.cpp This reverts commit r241343, as it was, again, breaking all ARM buildbots. llvm-svn: 241362
* - Refactored ARMTargetInfo in order to use the API of ↵Alexandros Lamprineas2015-07-031-118/+78
| | | | | | | | | | | llvm/lib/Support/TargetParser.cpp for extracting target specific information. - Patch for commit 241267: ShouldUseInlineAtomic was set incorrectly when subArch was not specified, causing regressions. Change-Id: Iabb35d59722f4972f1a3ab4365880add5bbcfdcc llvm-svn: 241343
* Revert "Refactored ARMTargetInfo in order to use the API of ↵Rafael Espindola2015-07-021-72/+117
| | | | | | | | llvm/lib/Support/TargetParser.cpp for extracting target specific information." This reverts commit r241267. Tests were failing on the bots. llvm-svn: 241275
* Refactored ARMTargetInfo in order to use the API of ↵Alexandros Lamprineas2015-07-021-117/+72
| | | | | | | | | llvm/lib/Support/TargetParser.cpp for extracting target specific information. Change-Id: Ia0b83ecdb8d9223f9c4ef38dd9206969f78e53f3 llvm-svn: 241267
* test commitAlexandros Lamprineas2015-07-021-0/+2
| | | | | Change-Id: Ibaa2e1115544ddfa491335b81226819fd9cc04b4 llvm-svn: 241260
* [OPENMP 4.0] Initial support for 'omp cancel' construct.Alexey Bataev2015-07-021-0/+1
| | | | | | Implemented parsing/sema analysis + (de)serialization. llvm-svn: 241253
* [OPENMP] Introduced type trait "__builtin_omp_required_simd_align" for ↵Alexey Bataev2015-07-022-0/+5
| | | | | | | | | default simd alignment. Adds type trait "__builtin_omp_required_simd_align" after discussions here http://reviews.llvm.org/D9894 Differential Revision: http://reviews.llvm.org/D10597 llvm-svn: 241237
* [OPENMP 4.0] Initial support for 'omp cancellation point' construct.Alexey Bataev2015-07-011-0/+1
| | | | | | Add parsing and sema analysis for 'omp cancellation point' directive. llvm-svn: 241145
* [modules] Before checking whether the controlling macro of a header is defined,Richard Smith2015-07-011-2/+0
| | | | | | | | | | | update the identifier in case we've imported a definition of the macro (and thus the contents of the header) from a module. Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longer makes sense to keep these separate now that the only user of the former also needs the latter. llvm-svn: 241137
* Fix sse4 for target attribute feature additions.Eric Christopher2015-07-011-1/+14
| | | | | | | | | | This reinstates part of the hack removed in r233223, by special casing sse4 as part of the feature additions. The notable change here is that we consider it only as part of setting the SSE level and not as part of the actual target features set which handles setting the rest of the masks. llvm-svn: 241130
* Add a function to ExternalASTSource that returns a descriptor thatAdrian Prantl2015-06-301-1/+1
| | | | | | | abstracts the commonalities between modules and PCH files that are needed to emit debug info for a module or precompiled header. llvm-svn: 241083
* Add support for the x86 builtin __builtin_cpu_supports.Eric Christopher2015-06-291-0/+28
| | | | | | | | | | | | | | | | | | | | This matches the implementation of the gcc support for the same feature, including checking the values set up by libgcc at runtime. The structure looks like this: unsigned int __cpu_vendor; unsigned int __cpu_type; unsigned int __cpu_subtype; unsigned int __cpu_features[1]; with a set of enums to match various fields that are field out after parsing the output of the cpuid instruction. This also adds a set of errors checking for valid input (and cpu). compiler-rt support for this and the other builtins in this family (__builtin_cpu_init and __builtin_cpu_is) are forthcoming. llvm-svn: 240994
* [ARM] The bits set in the variable HW_FP could get unsetRanjeet Singh2015-06-241-6/+10
| | | | | | | | | | | | when iterating through the Features vector if we don't keep track of what's already been set. This could lead to the macro __ARM_FP getting the wrong value. This patch fixes this issue by keeping track of the bits that have already been set in the loop. Differential Revision: http://reviews.llvm.org/D10395 llvm-svn: 240607
OpenPOWER on IntegriCloud