summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
Commit message (Collapse)AuthorAgeFilesLines
* [Preprocessor] Stop entering included files after hitting a fatal error.Volodymyr Sapsai2018-07-254-0/+15
| | | | | | | | | | | | | | | | | Fixes a problem when we have multiple inclusion cycles and try to enumerate all possible ways to reach the max inclusion depth. rdar://problem/38871876 Reviewers: bruno, rsmith, jkorous, aaron.ballman Reviewed By: bruno, jkorous, aaron.ballman Subscribers: dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D48786 llvm-svn: 337953
* [WebAssembly] Change size_t to `unsigned long`.Dan Gohman2018-07-241-20/+20
| | | | | | | | | | | | Changing it to unsigned long (which is 32-bit on wasm32) makes it the same type as wasm64 (where unsigned long is 64-bit), which would eliminate the most common cause for mangled names being different between wasm32 and wasm64. For example, export lists containing symbol names could now often be the same between wasm32 and wasm64. Differential Revision: https://reviews.llvm.org/D40526 llvm-svn: 337783
* [MS] Update _MSVC_LANG values for C++17 and C++2aReid Kleckner2018-07-232-103/+110
| | | | | | Fixes PR38262 llvm-svn: 337715
* By popular demand, switch in64_t on NetBSD/AArch64 and NetBSD/PowerPC64Joerg Sonnenberger2018-07-172-36/+36
| | | | | | to long for consistency with other 64bit platforms. llvm-svn: 337271
* [hmaptool] Turn %hmaptool into a proper substitutionBenjamin Kramer2018-06-223-3/+3
| | | | | | | This is still super ugly, but at least it doesn't require working directories to just line up perfectly for python to find the tool. llvm-svn: 335330
* Re-apply: Add python tool to dump and construct header mapsBruno Cardoso Lopes2018-06-219-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | Header maps are binary files used by Xcode, which are used to map header names or paths to other locations. Clang has support for those since its inception, but there's not a lot of header map testing around. Since it's a binary format, testing becomes pretty much brittle and its hard to even know what's inside if you don't have the appropriate tools. Add a python based tool that allows creating and dumping header maps based on a json description of those. While here, rewrite tests to use the tool and remove the binary files from the tree. This tool was initially written by Daniel Dunbar. Thanks to Stella Stamenova for helping make this work on Windows. Differential Revision: https://reviews.llvm.org/D46485 rdar://problem/39994722 llvm-svn: 335295
* Revert "Add python tool to dump and construct header maps"Bruno Cardoso Lopes2018-06-219-28/+11
| | | | | | | | | | | This reverts commit fcfa2dd517ec1a6045a81e8247e346d630a22618. Broke bots: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11315 http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10411/steps/test-check-all/logs/stdio llvm-svn: 335196
* Add python tool to dump and construct header mapsBruno Cardoso Lopes2018-06-209-11/+28
| | | | | | | | | | | | | | | | | | | | | | | Header maps are binary files used by Xcode, which are used to map header names or paths to other locations. Clang has support for those since its inception, but there's not a lot of header map testing around. Since it's a binary format, testing becomes pretty much brittle and its hard to even know what's inside if you don't have the appropriate tools. Add a python based tool that allows creating and dumping header maps based on a json description of those. While here, rewrite tests to use the tool and remove the binary files from the tree. This tool was initially written by Daniel Dunbar. Differential Revision: https://reviews.llvm.org/D46485 rdar://problem/39994722 llvm-svn: 335177
* [PowerPC] The __float128 type should only be available on Power9Stefan Pintilie2018-06-131-1/+1
| | | | | | | | | | | | Diasble the use of the type __float128 for PPC machines older than Power9. The use of -mfloat128 for PPC machine older than Power9 will result in an error. Differential Revision: https://reviews.llvm.org/D48088 llvm-svn: 334613
* [PATCH 2/2] [test] Add support for Samsung Exynos M4 (NFC)Evandro Menezes2018-06-062-0/+19
| | | | | | Add test cases for Exynos M4. llvm-svn: 334116
* [x86] invpcid intrinsicGabor Buella2018-05-251-0/+14
| | | | | | | | | | | | An intrinsic for an old instruction, as described in the Intel SDM. Reviewers: craig.topper, rnk Reviewed By: craig.topper, rnk Differential Revision: https://reviews.llvm.org/D47142 llvm-svn: 333256
* Revert "Revert r332955 "GNUstep Objective-C ABI version 2""David Chisnall2018-05-221-0/+7
| | | | llvm-svn: 332963
* Revert r332955 "GNUstep Objective-C ABI version 2"Bjorn Pettersson2018-05-221-7/+0
| | | | | | | Reverted due to buildbot failures. Seems like isnumber() is some Apple addition to cctype. llvm-svn: 332957
* GNUstep Objective-C ABI version 2David Chisnall2018-05-221-0/+7
| | | | | | | | | | | | | | | | | | | | | Summary: This includes initial support for the (hopefully final) updated Objective-C ABI, developed here: https://github.com/davidchisnall/clang-gnustep-abi-2 It also includes some cleanups and refactoring from older GNU ABIs. The current version is ELF only, other formats to follow. Reviewers: rjmccall, DHowett-MSFT Reviewed By: rjmccall Subscribers: smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D46052 llvm-svn: 332950
* This patch aims to match the changes introducedAlexander Ivchenko2018-05-181-4/+0
| | | | | | | | | | | | | | | | | in gcc by https://gcc.gnu.org/ml/gcc-cvs/2018-04/msg00534.html. The -mibt feature flag is being removed, and the -fcf-protection option now also defines a CET macro and causes errors when used on non-X86 targets, while X86 targets no longer check for -mibt and -mshstk to determine if -fcf-protection is supported. -mshstk is now used only to determine availability of shadow stack intrinsics. Comes with an LLVM patch (D46882). Patch by mike.dvoretsky Differential Revision: https://reviews.llvm.org/D46881 llvm-svn: 332704
* [X86] ptwrite intrinsicGabor Buella2018-05-101-0/+4
| | | | | | | | | | Reviewers: craig.topper, RKSimon Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46540 llvm-svn: 331962
* [x86] Introduce the pconfig intrinsicGabor Buella2018-05-081-0/+2
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46431 llvm-svn: 331740
* [X86] directstore and movdir64b intrinsicsGabor Buella2018-05-011-0/+4
| | | | | | | | | | Reviewers: spatel, craig.topper, RKSimon Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45984 llvm-svn: 331249
* [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macroOliver Stannard2018-04-271-0/+5
| | | | | | | | | | | | | | This adds a pre-defined macro to test if the compiler has support for the v8.2-A dot rpoduct intrinsics in AArch32 mode. The AAcrh64 equivalent has already been added by rL330229. The ACLE spec which describes this macro hasn't been published yet, but this is based on the final internal draft, and GCC has already implemented this. Differential revision: https://reviews.llvm.org/D46108 llvm-svn: 331038
* [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__Yaxun Liu2018-04-251-0/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D45441 llvm-svn: 330824
* [X86] WaitPKG intrinsicsGabor Buella2018-04-201-0/+2
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45254 llvm-svn: 330463
* [AAch64] Add the __ARM_FEATURE_DOTPROD macro definitionJunmo Park2018-04-171-0/+4
| | | | | | | | | This matches what GCC does. https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64-c.c Differential Revision: https://reviews.llvm.org/D45544 llvm-svn: 330229
* [X86] Introduce archs: goldmont-plus & tremontGabor Buella2018-04-161-0/+141
| | | | | | | | | | | | Reviewers: craig.topper Reviewed By: craig.topper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45613 llvm-svn: 330110
* Fix test failure caused by r329965.Eli Friedman2018-04-121-1/+1
| | | | | | | | "-mllvm" options get parsed slightly earlier, and -arm-restrict-it is only available if the ARM target is compiled in. Invoke "clang -cc1" directly to avoid the issue. llvm-svn: 329968
* NFC - Indentation fixes in predefined-arch-macros.cGabor Buella2018-04-121-90/+103
| | | | | | | | | | | | | Consistently separating tests with empty lines. Helps while navigating this file. Reviewers: craig.topper Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45561 llvm-svn: 329932
* [OpenCL] Added -std/-cl-std=c++Anastasia Stulova2018-04-121-0/+6
| | | | | | | | This is std option for OpenCL C++ v1.0. Differential Revision: https://reviews.llvm.org/D45363 llvm-svn: 329911
* [x86] wbnoinvd intrinsicGabor Buella2018-04-111-0/+4
| | | | | | | | | | | | | | The WBNOINVD instruction writes back all modified cache lines in the processor’s internal cache to main memory but does not invalidate (flush) the internal caches. Reviewers: craig.topper, zvi, ashlykov Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D43817 llvm-svn: 329848
* [X86] Split up -march=icelake to -client & -serverGabor Buella2018-04-101-3/+116
| | | | | | | | | | Reviewers: craig.topper, zvi, echristo Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45056 llvm-svn: 329741
* [X86] Disable SGX for Skylake Server - CPP testGabor Buella2018-04-101-2/+2
| | | | | | | | | | | | | | Summary: Fix test case - corresponding to r329701 Reviewers: craig.topper, davezarzycki Reviewed By: davezarzycki Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45488 llvm-svn: 329710
* Fix typos in clangAlexander Kornienko2018-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfoShiva Chen2018-04-051-0/+49
| | | | | | | | | | | | | | Summary: This patch extend getTargetDefines and implement handleTargetFeatures and hasFeature. and define corresponding marco for those features. Reviewers: asb, apazos, eli.friedman Differential Revision: https://reviews.llvm.org/D44727 Patch by Kito Cheng. llvm-svn: 329278
* Fix some handling of AST nodes with diagnostics.Richard Trieu2018-03-281-6/+6
| | | | | | | | | The diagnostic system for Clang can already handle many AST nodes. Instead of converting them to strings first, just hand the AST node directly to the diagnostic system and let it handle the output. Minor changes in some diagnostic output. llvm-svn: 328688
* [ms] Parse #pragma optimize and ignore it behind its own flagHans Wennborg2018-03-201-0/+8
| | | | | | | | | This allows users to turn off warnings about this pragma specifically, while still receiving warnings about other ignored pragmas. Differential Revision: https://reviews.llvm.org/D44630 llvm-svn: 327959
* [AAch64] Tests for ACLE FP16 macrosSjoerd Meijer2018-03-151-0/+12
| | | | | | | | This adds some missing tests for the AArch64 FP16 macros. Differential Revision: https://reviews.llvm.org/D44512 llvm-svn: 327623
* [ARM] ACLE FP16 feature test macrosSjoerd Meijer2018-03-131-0/+12
| | | | | | | | | This is a partial recommit of r327189 that was reverted due to test issues. I.e., this recommits minimal functional change, the FP16 feature test macros, and adds tests that were missing in the original commit. llvm-svn: 327455
* Correct the alignment for the PS4 targetMatthew Voss2018-03-071-0/+3
| | | | | | https://reviews.llvm.org/D44218 llvm-svn: 326942
* [RISCV] Enable __int128_t and __uint128_t through clang flagMandeep Singh Grang2018-02-251-0/+4
| | | | | | | | | | | | | | | | Summary: If the flag -fforce-enable-int128 is passed, it will enable support for __int128_t and __uint128_t types. This flag can then be used to build compiler-rt for RISCV32. Reviewers: asb, kito-cheng, apazos, efriedma Reviewed By: asb, efriedma Subscribers: shiva0217, efriedma, jfb, dschuff, sdardis, sbc100, jgravelle-google, aheejin, rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, cfe-commits Differential Revision: https://reviews.llvm.org/D43105 llvm-svn: 326045
* [X86] Disable CLWB in Cannon LakeCraig Topper2018-02-211-2/+2
| | | | | | | | | | | Cannon Lake does not support CLWB, therefore it does not include all features listed under SKX. Patch by Gabor Buella Differential Revision: https://reviews.llvm.org/D43459 llvm-svn: 325655
* [ARM] disable FPU features when using soft floating point.Keith Walker2018-02-191-47/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | To be compatible with GCC if soft floating point is in effect any FPU specified is effectively ignored, eg, -mfloat-abi=soft -fpu=neon If any floating point features which require FPU hardware are enabled they must be disable. There was some support for doing this for NEON, but it did not handle VFP, nor did it prevent the backend from emitting the build attribute Tag_FP_arch describing the generated code as using the floating point hardware if a FPU was specified (even though soft float does not use the FPU). Disabling the hardware floating point features for targets which are compiling for soft float has meant that some tests which were incorrectly checking for hardware support also needed to be updated. In such cases, where appropriate the tests have been updated to check compiling for soft float and a non-soft float variant (usually softfp). This was usually because the target specified in the test defaulted to soft float. Differential Revision: https://reviews.llvm.org/D42569 llvm-svn: 325492
* Support `#pragma comment(lib, "name")` in the frontend for ELFSaleem Abdulrasool2018-02-072-2/+7
| | | | | | | | | | | | | This adds the frontend support required to support the use of the comment pragma to enable auto linking on ELFish targets. This is a generic ELF extension supported by LLVM. We need to change the handling for the "dependentlib" in order to accommodate the previously discussed encoding for the dependent library descriptor. Without the custom handling of the PCK_Lib directive, the -l prefixed option would be encoded into the resulting object (which is treated as a frontend error). llvm-svn: 324438
* [Myriad] Define __ma2x5x and __ma2x8xWalter Lee2018-02-061-0/+4
| | | | | | | | | | | | Summary: Add architecture defines for ma2x5x and ma2x8x. Reviewers: jyknight Subscribers: fedor.sergeev, MartinO Differential Revision: https://reviews.llvm.org/D42882 llvm-svn: 324420
* [RISCV] Create a LinuxTargetInfo when targeting LinuxAlex Bradbury2018-02-031-0/+18
| | | | | | | | | | | | | | Previously, RISCV32TargetInfo or RISCV64TargetInfo were created unconditionally. Use LinuxTargetInfo<RISCV??TargetInfo> to ensure that the proper OS-specific defines are present. This patch only adds logic to instantiate LinuxTargetInfo and leaves a TODO, as I'm reluctant to add logic for other targets (e.g. FreeBSD, RTEMS) until I've produced and tested at least one binary for that OS+target combo. Thanks to @mgrang to reporting the issue. llvm-svn: 324170
* [X86] Add 'rdrnd' feature to silvermont to match recent gcc bug fix.Craig Topper2018-01-261-0/+2
| | | | | | gcc recently fixed this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83546 llvm-svn: 323552
* [X86] Define __IBT__ when -mibt is specified.Craig Topper2018-01-261-2/+6
| | | | llvm-svn: 323543
* [X86] Add rdpid command line option and intrinsics.Craig Topper2018-01-202-0/+5
| | | | | | | | | | | | | | Summary: This patch adds -mrdpid/-mno-rdpid and the rdpid intrinsic. The corresponding LLVM commit has already been made. Reviewers: RKSimon, spatel, zvi, AndreiGrischenko Reviewed By: RKSimon Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42272 llvm-svn: 323047
* [X86] Add missing check for RDSEED to ICL, CNL, SKX sections of ↵Craig Topper2018-01-191-0/+6
| | | | | | test/Preprocessor/predefined-arch-macros.c llvm-svn: 322912
* Revert 319303: Add _Float128 as alias to __float128 to enable compilations ↵Erich Keane2018-01-151-10/+10
| | | | | | | | on Fedora27/glibc2 Differential Revision: https://reviews.llvm.org/D40673 llvm-svn: 322518
* [RISCV] Add the RISCV target and compiler driverAlex Bradbury2018-01-111-0/+395
| | | | | | | | | As RV64 codegen has not yet been upstreamed into LLVM, we focus on RV32 driver support (RV64 to follow). Differential Revision: https://reviews.llvm.org/D39963 llvm-svn: 322276
* Preserve unknown STDC pragma through preprocessorSteven Wu2018-01-051-2/+18
| | | | | | | | | | | | | | | | | | | Summary: #pragma STDC FP_CONTRACT handler is only registered in parser so we should keep the unknown STDC pragma through preprocessor and we also should not emit warning for unknown STDC pragma during preprocessor. rdar://problem/35724351 Reviewers: efriedma, rsmith, arphaman Reviewed By: efriedma Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41780 llvm-svn: 321909
* Use backslash escape, replacing xargs -0 in test macro-multiline.cHubert Tong2018-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: xargs supports escaping of newline characters with backslash. xargs -0 is neither part of POSIX nor the LSB. This patch removes the -0 option and adjusts the input to xargs accordingly; that is, the input is a text file not ending in an incomplete line, and the newline of interest is preceded by a backslash. Note: The treatment of escaped newline characters is not as clearly specified by POSIX as for escaped blank characters; however, the same can be said for escaped backslashes. It is slightly more clear for the case where the -I option is used; however, -I is also of limited portability. Reviewers: bruno Reviewed By: bruno Subscribers: bruno, rcraik, cfe-commits Differential Revision: https://reviews.llvm.org/D41544 llvm-svn: 321828
OpenPOWER on IntegriCloud