summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/predefined-macros.c
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Rename lang mode flag for C++ modeAnastasia Stulova2019-07-251-1/+1
| | | | | | | | | | | | Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++ or -std=clc++/-std=CLC++. This aligns with OpenCL C conversion and removes ambiguity with OpenCL C++. Differential Revision: https://reviews.llvm.org/D65102 llvm-svn: 367008
* Revert the tests that should've been reverted in rL341115Artem Belevich2018-08-301-3/+1
| | | | llvm-svn: 341118
* Add predefined macro __gnu_linux__ for proper aux-tripleYaxun Liu2018-08-291-1/+3
| | | | | | | | | | | | Clang predefine macro __linx__ for aux-triple with Linux OS but does not predefine macro __gnu_linux__. This causes some compilation error for certain applications, e.g. Eigen. This patch fixes that. Differential Revision: https://reviews.llvm.org/D51441 llvm-svn: 340967
* [MS] Update _MSVC_LANG values for C++17 and C++2aReid Kleckner2018-07-231-103/+0
| | | | | | Fixes PR38262 llvm-svn: 337715
* [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
* [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
* [OpenCL] Define __IMAGE_SUPPORT__ macro for SPIRSven van Haastregt2017-12-041-0/+4
| | | | | | | | | | | Add #define __IMAGE_SUPPORT__ 1 for SPIR targets to indicate that SPIR supports images. Patch by Dmitry Borisenkov. Differential Revision: https://reviews.llvm.org/D40252 llvm-svn: 319658
* [MINGW] normalize WIN32 macrosMartell Malone2017-11-211-0/+58
| | | | | | | | | | | | | | move _WIN64 and _WIN32 defines to lib/Basic/Targets/OSTargets.h move WIN32, WIN64 and __MINGW64__ to addMinGWDefines fixes __MINGW64__ not being defined for aarch64 adds WIN32 definition for x64 Reviewers: mstorsjo Differential Revision: https://reviews.llvm.org/D40285 llvm-svn: 318755
* [AArch64] Add support for a MinGW AArch64 targetMartin Storsjo2017-08-131-0/+10
| | | | | | Differential Revision: https://reviews.llvm.org/D36364 llvm-svn: 310798
* [test] Remove an unintentional -x cl flag in an aarch64-windows testMartin Storsjo2017-08-061-1/+1
| | | | | | | | This test was only intended to test compiling C, not OpenCL. Differential Revision: https://reviews.llvm.org/D36363 llvm-svn: 310222
* Add OpenCL 2.0 atomic builtin functions as Clang builtinYaxun Liu2017-08-041-0/+8
| | | | | | | | | | | | | | | | | | | | | OpenCL 2.0 atomic builtin functions have a scope argument which is ideally represented as synchronization scope argument in LLVM atomic instructions. Clang supports translating Clang atomic builtin functions to LLVM atomic instructions. However it currently does not support synchronization scope of LLVM atomic instructions. Without this, users have to use LLVM assembly code to implement OpenCL atomic builtin functions. This patch adds OpenCL 2.0 atomic builtin functions as Clang builtin functions, which supports generating LLVM atomic instructions with synchronization scope operand. Currently only constant memory scope argument is supported. Support of non-constant memory scope argument will be added later. Differential Revision: https://reviews.llvm.org/D28691 llvm-svn: 310082
* [COFF, ARM64] Add support for Windows ARM64 COFF formatMandeep Singh Grang2017-06-271-0/+6
| | | | | | | | | | | | | | Summary: This is the clang part of the initial implementation to support Windows ARM64 COFF format. Reviewers: ruiu, t.p.northover, rnk, compnerd Reviewed By: ruiu, compnerd Subscribers: aemerson, kristof.beyls, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D34706 llvm-svn: 306489
* [clang-cl] Define _MSVC_LANGDavid Majnemer2016-06-281-6/+8
| | | | | | | | | | | Recently, Microsoft added support for a flag, /std, which controls which version of the language rules MSVC should use. MSVC hasn't updated __cplusplus though. Instead, they added a new macro, _MSVC_LANG, which is defined in a similar fashion to __cplusplus. This is used to indicate which mode the compiler is in. llvm-svn: 273987
* [OpenCL] Add predefined macros.Yaxun Liu2016-04-261-0/+37
| | | | | | | | | | | | OpenCL spec requires __OPENCL_C_VERSION__ to be defined based on -cl-std option. This patch implements that. The patch also defines __FAST_RELAXED_MATH__ based on -cl-fast-relaxed-math option. Also fixed a test using -std=c99 for OpenCL program. Limit allowed language standard of OpenCL to be OpenCL standards. Differential Revision: http://reviews.llvm.org/D19071 llvm-svn: 267590
* Clean up a couple more preprocessor tests to use match-full-lines.James Y Knight2016-04-011-36/+36
| | | | llvm-svn: 265187
* [mips] Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros.Daniel Sanders2015-12-221-0/+12
| | | | | | | This fixes the 'pure virtual function called' failure with ThreadPool in a clang-built clang. This fixes the llvm-mips-linux builder. llvm-svn: 256240
* [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
* Follow-up commit to r211657 which introduced these macros, but not for MSVC. ↵Aaron Ballman2014-10-211-51/+51
| | | | | | This turns out to break our freestanding tests on Windows when compiling in MSVC-compatible mode. It was decided (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141020/116942.html is the start of the thread) to support this as part of Clang's interface on all platforms. llvm-svn: 220312
* Driver: bifurcate extended and basic MSC versioningSaleem Abdulrasool2014-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This restores the original behaviour of -fmsc-version. The older option remains as a mechanism for specifying the basic version information. A secondary option, -fms-compatibility-version permits the user to specify an extended version to the driver. The new version takes the value as a dot-separated value rather than the major * 100 + minor format that -fmsc-version format. This makes it easier to specify the value as well as a more flexible manner for specifying the value. Specifying both values is considered an error. The older parameter is left solely as a driver option, which is normalised into the newer parameter. This allows us to retain a single code path in the compiler itself whilst preserving the semantics of the old parameter as well as avoid having to determine which of two formats are being used by the invocation. The test changes are due to the fact that the compiler no longer supports the old option, and is a direct conversion to the new option. llvm-svn: 213119
* Avoid definining more GCC specific predefined macros in clang-clEhsan Akhgari2014-07-101-1/+16
| | | | | | | | | | Reviewers: hansw, rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4419 llvm-svn: 212753
* Do not define __STRICT_ANSI__ in clang-clEhsan Akhgari2014-06-301-0/+1
| | | | llvm-svn: 212066
* Implement predefined stdint macrosJF Bastien2014-06-251-0/+56
| | | | | | | | | | | | Add predefined stdint macros that match the given patterns: U?INT{_,_FAST,_LEAST}{8,16,32,64}_{MAX,TYPE} U?INT{PTR,MAX}_{MAX,TYPE} http://reviews.llvm.org/D4141 Author: binji llvm-svn: 211657
* Fix PR 12730: Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for ARMWeiming Zhao2013-09-301-0/+18
| | | | llvm-svn: 191707
* Add support for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} on x86.Michael J. Spencer2013-04-041-0/+18
| | | | | | This fixes std::thread with libstdc++. llvm-svn: 178816
* Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.Bob Wilson2012-07-191-0/+13
| | | | | | | This macro was being unconditionally set to zero, preceded by a FIXME comment. This fixes <rdar://problem/11845441>. Patch by Michael Gottesman! llvm-svn: 160491
* Updated the test so that it checks for ms-compatibility in addition to ↵Aaron Ballman2012-03-101-1/+1
| | | | | | ms-extensions. llvm-svn: 152516
* No longer defining GNUC mode when compiling for Microsoft compatibility. ↵Aaron Ballman2012-03-101-0/+1
| | | | | | This allows people's cross-platform compiler-specific macros to work properly. llvm-svn: 152512
* Teach the frontend to provide the builtin preprocessor defines forChandler Carruth2012-01-031-12/+14
| | | | | | -ffast-math. llvm-svn: 147440
* Add test for Windows predefined macros.Michael J. Spencer2010-10-211-0/+12
llvm-svn: 117000
OpenPOWER on IntegriCloud