summaryrefslogtreecommitdiffstats
path: root/clang/test/Headers
Commit message (Collapse)AuthorAgeFilesLines
...
* [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extensionAndrew Savonichev2018-11-081-0/+1
| | | | | | | | | | | | | | | | | | Summary: Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt Patch by Kristina Bessonova Reviewers: Anastasia, yaxunl, shafik Reviewed By: Anastasia Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits Differential Revision: https://reviews.llvm.org/D51484 llvm-svn: 346392
* Revert r346326 [OpenCL] Add support of ↵Andrew Savonichev2018-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | cl_intel_device_side_avc_motion_estimation This patch breaks Index/opencl-types.cl LIT test: Script: -- : 'RUN: at line 1'; stage1/bin/c-index-test -test-print-type llvm/tools/clang/test/Index/opencl-types.cl -cl-std=CL2.0 | stage1/bin/FileCheck llvm/tools/clang/test/Index/opencl-types.cl -- Command Output (stderr): -- llvm/tools/clang/test/Index/opencl-types.cl:3:26: warning: unsupported OpenCL extension 'cl_khr_fp16' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:4:26: warning: unsupported OpenCL extension 'cl_khr_fp64' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:8:9: error: use of type 'double' requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:11:8: error: declaring variable of type 'half' is not allowed llvm/tools/clang/test/Index/opencl-types.cl:15:3: error: use of type 'double' requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:16:3: error: use of type 'double4' (vector of 4 'double' values) requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:26:26: warning: unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:35:44: error: use of type '__read_only image2d_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:36:49: error: use of type '__read_only image2d_array_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:37:49: error: use of type '__read_only image2d_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:38:54: error: use of type '__read_only image2d_array_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm-svn: 346338
* [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extensionAndrew Savonichev2018-11-071-0/+1
| | | | | | | | | | | | | | | | | | Summary: Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt Patch by Kristina Bessonova Reviewers: Anastasia, yaxunl, shafik Reviewed By: Anastasia Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits Differential Revision: https://reviews.llvm.org/D51484 llvm-svn: 346326
* PR26547: alignof should return ABI alignment, not preferred alignmentRichard Smith2018-10-261-3/+3
| | | | | | | | | | | | Summary: - Add `UETT_PreferredAlignOf` to account for the difference between `__alignof` and `alignof` - `AlignOfType` now returns ABI alignment instead of preferred alignment iff clang-abi-compat > 7, and one uses _Alignof or alignof Patch by Nicole Mazzuca! Differential Revision: https://reviews.llvm.org/D53207 llvm-svn: 345419
* [OpenCL] Add cl_intel_planar_yuv extensionAndrew Savonichev2018-10-231-2/+15
| | | | | | | | | | Just adding a preprocessor #define for the extension. Patch by Alexey Sotkin and Dmitry Sidorov Phabricator review: https://reviews.llvm.org/D51402 llvm-svn: 345044
* Fix march triple used test from rL341475Diogo N. Sampaio2018-09-062-29/+28
| | | | | | | Change the march triple of test files, possible fixing test failures due rL341475 llvm-svn: 341548
* Fix arm_neon.h and arm_fp16.h generation for compiling with std=c89Diogo N. Sampaio2018-09-052-0/+38
| | | | | | | | | | | | | | | | | Summary: The inline attribute is not valid for C standard 89. Replace the argument in the generation of header files with __inline, as well adding tests for both header files. Reviewers: pbarrio, SjoerdMeijer, javed.absar, t.p.northover Subscribers: t.p.northover, kristof.beyls, chrib, cfe-commits Differential Revision: https://reviews.llvm.org/D51683 test/Headers/arm-fp16-header.c test/Headers/arm-neon-header.c utils/TableGen/NeonEmitter.cpp llvm-svn: 341475
* Make __shiftleft128 / __shiftright128 real compiler built-ins.Nico Weber2018-08-171-2/+0
| | | | | | | | | | | | r337619 added __shiftleft128 / __shiftright128 as functions in intrin.h. Microsoft's STL plans on using these functions, and they're using intrin0.h which just has declarations of built-ins to not pull in the huge intrin.h header in the standard library headers. That requires that these functions are real built-ins. https://reviews.llvm.org/D50907 llvm-svn: 340048
* [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBLPirama Arumuga Nainar2018-08-081-0/+24
| | | | | | | | | | | | | | Summary: These macros are defined in the C11 standard and can be defined based on the __*_HAS_DENORM__ default macros. Reviewers: bruno, rsmith, doug.gregor Subscribers: llvm-commits, enh, srhines Differential Revision: https://reviews.llvm.org/D37302 llvm-svn: 339284
* [ms] Add __shiftleft128 / __shiftright128 intrinsicsNico Weber2018-07-201-0/+2
| | | | | | | | | | | | Carefully match the pattern matched by ISel so that this produces shld / shrd (unless Subtarget->isSHLDSlow() is true). Thanks to Craig Topper for providing the LLVM IR pattern that gets successfully matched. Fixes PR37755. llvm-svn: 337619
* Add a test to verify the x86 intrinsic headers compile cleanly with no ↵Douglas Yung2018-06-201-0/+14
| | | | | | warnings or errors. llvm-svn: 335088
* [X86] Reduce the number of setzero intrinsics to just the set defined by the ↵Craig Topper2018-05-301-4/+0
| | | | | | | | | | Intel Intrinsics Guide. We had quite a few for different element sizes of integers sometimes with strange target features attached to them. We only need a single version for each of _m128i, _m256i, and _m512i with the target feature that first introduced those types. llvm-svn: 333568
* [X86] NFC Include immintrin.h in CodeGen testsGabor Buella2018-05-242-2/+2
| | | | | | | Following r333110: "Move all Intel defined intrinsic includes into immintrin.h" llvm-svn: 333160
* [x86] Introduce the encl[u|s|v] intrinsicsGabor Buella2018-05-081-0/+27
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46435 llvm-svn: 331743
* [x86] Introduce the pconfig intrinsicGabor Buella2018-05-081-0/+12
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46431 llvm-svn: 331740
* Revert "Emit an error when mixing <stdatomic.h> and <atomic>"Volodymyr Sapsai2018-05-021-10/+0
| | | | | | | | | | | | | It reverts r331378 as it caused test failures ThreadSanitizer-x86_64 :: Darwin/gcd-groups-destructor.mm ThreadSanitizer-x86_64 :: Darwin/libcxx-shared-ptr-stress.mm ThreadSanitizer-x86_64 :: Darwin/xpc-race.mm Only clang part of the change is reverted, libc++ part remains as is because it emits error less aggressively. llvm-svn: 331392
* Emit an error when mixing <stdatomic.h> and <atomic>Volodymyr Sapsai2018-05-021-0/+10
| | | | | | | | | | | | | | | | | | | | | Atomics in C and C++ are incompatible at the moment and mixing the headers can result in confusing error messages. Emit an error explicitly telling about the incompatibility. Introduce the macro `__ALLOW_STDC_ATOMICS_IN_CXX__` that allows to choose in C++ between C atomics and C++ atomics. rdar://problem/27435938 Reviewers: rsmith, EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: jkorous-apple, christof, bumblebritches57, JonChesterfield, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D45470 llvm-svn: 331378
* Fix typos in clangAlexander Kornienko2018-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 llvm-svn: 329399
* In stdbool.h, define bool, false, true only in gnu++98Stephan Bergmann2017-12-081-5/+11
| | | | | | | | | | GCC has meanwhile corrected that with the similar <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=216679> "C++11 explicitly forbids macros for bool, true and false." Differential Revision: https://reviews.llvm.org/D40167 llvm-svn: 320135
* [X86] Add 3dnow and 3dnowa to the list of valid target featuresMartin Storsjo2017-11-061-0/+16
| | | | | | | | These were missed in SVN r316783, which broke compiling mingw-w64 CRT. Differential Revision: https://reviews.llvm.org/D39631 llvm-svn: 317504
* Driver: hoist the `wchar_t` handling to the driverSaleem Abdulrasool2017-10-061-1/+1
| | | | | | | | | | | | | | | | Move the logic for determining the `wchar_t` type information into the driver. Rather than passing the single bit of information of `-fshort-wchar` indicate to the frontend the desired type of `wchar_t` through a new `-cc1` option of `-fwchar-type` and indicate the signedness through `-f{,no-}signed-wchar`. This replicates the current logic which was spread throughout Basic into the `RenderCharacterOptions`. Most of the changes to the tests are to ensure that the frontend uses the correct type. Add a new test set under `test/Driver/wchar_t.c` to ensure that we calculate the proper types for the various cases. llvm-svn: 315126
* This adds the _Float16 preprocessor macro definitions.Sjoerd Meijer2017-09-131-0/+65
| | | | | | Differential Revision: https://reviews.llvm.org/D34695 llvm-svn: 313152
* Add test that we get the correct calling convention and mangling for va_list.Richard Smith2017-08-161-0/+36
| | | | llvm-svn: 310982
* [Headers] Add a test for arm64intr.hMartin Storsjo2017-07-271-0/+4
| | | | | | | | | This tests the ARM64 specific constants added in SVN r309081, similar to the one added in r277928 for armintr.h. Differential Revision: https://reviews.llvm.org/D35934 llvm-svn: 309314
* support operator keywords used in Windows SDKErich Keane2017-06-093-0/+54
| | | | | | | | | | | | | | | | | | to support operator keywords used in Windows SDK, alter token type when seen in system headers Hello, I submitted D33505 to address this problem, but the proposal was rejected as too big a hammer. This change will allow clang to parse the WindowsSDK header <query.h> which uses the operator name "or" as a field name. Treat cpp operator keywords as ordinary identifiers inside the Microsoft headers, but treat them as usual in the user's program. Original Submitter: Melanie Blower (mibintc) Differential Revision: https://reviews.llvm.org/D33782 llvm-svn: 305087
* Headers: Make the type of SIZE_MAX the same as size_tDuncan P. N. Exon Smith2017-04-271-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | size_t is usually defined as unsigned long, but on 64-bit platforms, stdint.h currently defines SIZE_MAX using "ull" (unsigned long long). Although this is the same width, it doesn't necessarily have the same alignment or calling convention. It also triggers printf warnings when using the format flag "%zu" to print SIZE_MAX. This changes SIZE_MAX to reuse the compiler-provided __SIZE_MAX__, and provides similar fixes for the other integers: - INTPTR_MIN - INTPTR_MAX - UINTPTR_MAX - PTRDIFF_MIN - PTRDIFF_MAX - INTMAX_MIN - INTMAX_MAX - UINTMAX_MAX - INTMAX_C() - UINTMAX_C() ... and fixes the typedefs for intptr_t and uintptr_t to use __INTPTR_TYPE__ and __UINTPTR_TYPE__ instead of int32_t, effectively reverting r89224, r89226, and r89237 (r89221 already having been effectively reverted). We can probably also kill __INTPTR_WIDTH__, __INTMAX_WIDTH__, and __UINTMAX_WIDTH__ in a follow-up, but I was hesitant to delete all the per-target CHECK lines in this commit since those might serve their own purpose. rdar://problem/11811377 llvm-svn: 301593
* Use __CLANG_ATOMIC_TYPE_LOCK_FREE macros in `stdatomic.h`Eric Fiselier2017-04-201-0/+1
| | | | | | | | | | | | | | Summary: This patch makes the header `stdatomic.h` work when `-fms-compatibility` is specified. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32322 llvm-svn: 300919
* Remove the -faltivec alias option and replace it with -maltivec everywhere.Eric Christopher2017-03-212-4/+4
| | | | | | | | | | | The alias was only ever used on darwin and had some issues there, and isn't used in practice much. Also fixes a problem with -mno-altivec not turning off -maltivec. Also add a diagnostic for faltivec/fno-altivec that directs users to use maltivec options and include the altivec.h file explicitly. llvm-svn: 298449
* Fix parsing of htmxlintrin.h in C++ modeEric Christopher2017-03-201-0/+19
| | | | | | | | - Fix a variable naming mismatch - Fix gcc extension pointer arithmetic on void to cast to char *. - Test that the header (and htmintrin.h) parse. llvm-svn: 298318
* [X86] Add NumRegisterParameters Module Flag.Nirav Dave2017-03-181-1/+1
| | | | | | | | | | Reviewers: rnk, mkuper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27051 llvm-svn: 298177
* [Headers] Reapply: Add #include_next for tgmath.h on DarwinBruno Cardoso Lopes2017-03-163-0/+17
| | | | | | | | | | | | Reapply r289181 but rename the include guard to avoid conflict with the one from Darwin. Allow darwin to provide additional definitions and implementation specifc values for tgmath.h on Apple platforms. rdar://problem/19019845 llvm-svn: 298013
* [OpenCL] Correct ndrange_t implementationAnastasia Stulova2017-02-161-9/+9
| | | | | | | | | | | | | | | Removed ndrange_t as Clang builtin type and added as a struct type in the OpenCL header. Use type name to do the Sema checking in enqueue_kernel and modify IR generation accordingly. Review: D28058 Patch by Dmitry Borisenkov! llvm-svn: 295311
* [OpenCL] Diagnose write_only image3d when extension is disabledAnastasia Stulova2017-01-251-6/+19
| | | | | | | | | | | | | | Prior to OpenCL 2.0, image3d_t can only be used with the write_only access qualifier when the cl_khr_3d_image_writes extension is enabled, see e.g. OpenCL 1.1 s6.8b. Require the extension for write_only image3d_t types and guard uses of write_only image3d_t in the OpenCL header. Patch by Sven van Haastregt! Review: https://reviews.llvm.org/D28860 llvm-svn: 293050
* Guard __gnuc_va_list typedef.Paul Robinson2017-01-231-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D28620 llvm-svn: 292819
* Revert "[Headers] Add #include_next for tgmath.h on Darwin"Bruno Cardoso Lopes2016-12-122-16/+0
| | | | | | | | | Reverts r289181: it's currently breaking modules using simd.h in 10.12 SDK. This reverts commit 6e73e3464e96a4e00492c24aa790d36e1adb5702. llvm-svn: 289487
* [Headers] Add #include_next for tgmath.h on DarwinBruno Cardoso Lopes2016-12-092-0/+16
| | | | | | | | | Allow darwin to provide additional definitions and implementation specifc values for tgmath.h on Apple platforms. rdar://problem/19019845 llvm-svn: 289181
* [Headers] Enable #include_next<float.h> on DarwinBruno Cardoso Lopes2016-12-082-0/+19
| | | | | | | | | Allows darwin targets to provide additional definitions and implementation specifc values for float.h rdar://problem/21961491 llvm-svn: 289018
* [OpenCL] Remove redundant test for OpenCL header fileYaxun Liu2016-11-071-32/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D26302 llvm-svn: 286114
* Implement __stosb intrinsic as a volatile memsetAlbert Gutowski2016-10-141-1/+0
| | | | | | | | | | | | Summary: We need `__stosb` to be an intrinsic, because SecureZeroMemory function uses it without including intrin.h. Implementing it as a volatile memset is not consistent with MSDN specification, but it gives us target-independent IR while keeping the most important properties of `__stosb`. Reviewers: rnk, hans, thakis, majnemer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25334 llvm-svn: 284253
* Add some MS aliases for existing intrinsicsAlbert Gutowski2016-09-141-0/+11
| | | | | | | | | | Reviewers: thakis, compnerd, majnemer, rsmith, rnk Subscribers: alexshap, cfe-commits Differential Revision: https://reviews.llvm.org/D24330 llvm-svn: 281540
* Add MS __nop intrinsic to intrin.hReid Kleckner2016-09-071-0/+1
| | | | | | | | | | | | | | | Summary: There was no definition for __nop function - added inline assembly. Patch by Albert Gutowski! Reviewers: rnk, thakis Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24286 llvm-svn: 280826
* Test case for r280607 to check presence and sanity of the *_LOCK_FREEJoerg Sonnenberger2016-09-041-0/+32
| | | | | | macros. llvm-svn: 280622
* Revert "[X86] Add xgetbv/x[X86] Add xgetbv xsetbv intrinsics to non-windows ↵Reid Kleckner2016-08-161-0/+1
| | | | | | | | platforms" This reverts commit r278783. It breaks usage of _xgetbv on Windows. llvm-svn: 278814
* [X86] Add xgetbv/x[X86] Add xgetbv xsetbv intrinsics to non-windows platformsMarina Yatsina2016-08-161-1/+0
| | | | | | | | commit on behalf of guyblank Differential Revision: https://reviews.llvm.org/D21959 llvm-svn: 278783
* Headers: Add ARM support to intrin.h for MSVC compatibilitySaleem Abdulrasool2016-08-061-0/+4
| | | | | | | | | | | | | | | | | This fixes compiling with headers from the Windows SDK for ARM, where the YieldProcessor function (in winnt.h) refers to _ARM_BARRIER_ISHST. The actual MSVC armintr.h contains a lot more definitions, but this is enough to build code that uses the Windows SDK but doesn't use ARM intrinsics directly. An alternative would to just keep the addition to intrin.h (to include armintr.h), but not actually ship armintr.h, instead having clang's intrin.h include armintr.h from MSVC's include directory. (That one works fine with clang, at least for building code that uses the Windows SDK.) Patch by Martin Storsjö! llvm-svn: 277928
* Attempting to fix lit test test/Headers/opencl-c-header.cl on cygwin.Yaxun Liu2016-06-271-2/+2
| | | | | | "chmod u-x *" does not work for lit on cygwin. llvm-svn: 273948
* clang/test/Headers/opencl-c-header.cl: Add explicit -triple x86_64-unknown ↵NAKAMURA Takumi2016-06-211-1/+1
| | | | | | | | | | to appease *-win32 targets. <stdin>:9:25: note: possible intended match here %call = tail call i8 @"\01?convert_char_rte@@$$J0YADD@Z"(i8 %x) #2 ^ llvm-svn: 273230
* [OpenCL] Include opencl-c.h by default as a clang moduleYaxun Liu2016-06-201-7/+64
| | | | | | | | | | Include opencl-c.h by default as a module to utilize the automatic AST caching mechanism of clang modules. Add an option -finclude-default-header to enable default header for OpenCL, which is off by default. Differential Revision: http://reviews.llvm.org/D20444 llvm-svn: 273191
* [X86] _MM_ALIGN16 attribute support for non-windows targetsZvi Rackover2016-06-181-0/+3
| | | | | | | | | | | | | | | | | Summary: This patch adds support for the _MM_ALIGN16 attribute on non-windows targets. This aligns Clang with ICC which supports the attribute on all targets. Fixes PR28056 Reviewers: aaboud, echristo, cfe-commits, mkuper Subscribers: zvi, mehdi_amini Projects: #clang-c Differential Revision: http://reviews.llvm.org/D21173 llvm-svn: 273095
* s/Intrin.h/intrin.h/, trying to fix the build after r272701Hans Wennborg2016-06-141-2/+2
| | | | llvm-svn: 272702
OpenPOWER on IntegriCloud