summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/init.c
Commit message (Collapse)AuthorAgeFilesLines
...
* [Mips] Define __mips_fpr and _MIPS_FPSET macros.Simon Atanasyan2013-10-181-0/+38
| | | | llvm-svn: 192969
* Add character set related __STDC_* definitions.Ed Schouten2013-09-291-0/+14
| | | | | | | | | | | | | Clang uses UTF-16 and UTF-32 for its char16_t's and char32_t's exclusively. This means that we can define __STDC_UTF_16__ and __STDC_UTF_32__ unconditionally. While there, define __STDC_MB_MIGHT_NEQ_WC__ for FreeBSD. FreeBSD's wchar_t's don't encode characters as ISO-10646; the encoding depends on the locale used. Because the character set used might not be a superset of ASCII, we must define __STDC_MB_MIGHT_NEQ_WC__. llvm-svn: 191631
* [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and passSimon Atanasyan2013-09-241-0/+5
| | | | | | this option to the assembler. llvm-svn: 191282
* Follow up on commit r190159. Also test the KFreeBSD i686 platform defines + ↵Sylvestre Ledru2013-09-061-1/+6
| | | | | | minor cosmetics llvm-svn: 190162
* Add a test for the KFreeBSD define (#define __FreeBSD_kernel__ 1). This was ↵Sylvestre Ledru2013-09-061-0/+4
| | | | | | introduced in commit r190048 llvm-svn: 190159
* Don't pass -O0 to clang_cc1, it is the default.Rafael Espindola2013-09-041-1/+1
| | | | llvm-svn: 189910
* Add XCore targetRobert Lytton2013-08-131-0/+3
| | | | llvm-svn: 188258
* [Mips] MSA frontend option supportJack Carter2013-08-121-0/+5
| | | | | | | | | | | This patch adds -mmsa and -mno-msa to the options supported by clang to enable and disable support for MSA. When MSA is enabled, a predefined macro '__mips_msa' is defined to 1. Patch by Daniel Sanders llvm-svn: 188184
* [PowerPC] Support powerpc64le as a syntax-checking target.Bill Schmidt2013-07-261-0/+113
| | | | | | | | | | | | | | | | | | | This patch provides basic support for powerpc64le as an LLVM target. However, use of this target will not actually generate little-endian code. Instead, use of the target will cause the correct little-endian built-in defines to be generated, so that code that tests for __LITTLE_ENDIAN__, for example, will be correctly parsed for syntax-only testing. Code generation will otherwise be the same as powerpc64 (big-endian), for now. The patch leaves open the possibility of creating a little-endian PowerPC64 back end, but there is no immediate intent to create such a thing. The new test case variant ensures that correct built-in defines for little-endian code are generated. llvm-svn: 187180
* Dont define __LONG_DOUBLE_128__ unless LongDoubleWidth is really 128bits width.Roman Divacky2013-07-031-0/+2
| | | | | | It's not the case on ie. FreeBSD. llvm-svn: 185572
* Fix MSP430 builtin types.Anton Korobeynikov2013-07-011-5/+5
| | | | | | Patch by Job Noorman! llvm-svn: 185362
* Fix a couple of PPC predefined macros that I spotted while driving byChandler Carruth2013-06-251-0/+8
| | | | | | | | this code. These aren't technically standard predefines for the platform but apparantly lots of folks use them as they show up within LLVM's own codebase. ;] This may even fix some self host issues w/ the JIT!!! llvm-svn: 184830
* OpenBSD/sparc64 uses long long for int64_t and intmax_t.Jakob Stoklund Olesen2013-05-191-0/+6
| | | | | | Other operating systems, including FreeBSD and NetBSD, use long. llvm-svn: 182215
* fix PR 15726: ptrdiff_t should be int on PowerPC DarwinDavid Fang2013-05-161-0/+106
| | | | llvm-svn: 182029
* Use correct types for SPARC v9.Jakob Stoklund Olesen2013-05-151-0/+8
| | | | | | It's an LP64 platform. llvm-svn: 181867
* C++1y: Update __cplusplus to temporary value 201305L to allow detection of ↵Richard Smith2013-05-071-1/+19
| | | | | | | | | provisional C++1y support. Add __has_feature and __has_extension checks for C++1y features (based on the provisional names from the C++ features study group), and update documentation to match. llvm-svn: 181342
* Add SystemZ supportUlrich Weigand2013-05-061-0/+92
| | | | | | | | | | | | | | This patch then adds all the usual platform-specific pieces for SystemZ: driver support, basic target info, register names and constraints, ABI info and vararg support. It also adds new tests to verify pre-defined macros and inline asm, and updates a test for the minimum alignment change. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. llvm-svn: 181211
* Make sure we define wchar_t related macros correctly in -fms-extensions mode.Hans Wennborg2013-05-021-1/+15
| | | | | | | | This adds a test to make sure we define _WCHAR_T_DEFINED and _NATIVE_WCHAR_T_DEFINED correctly in the preprocessor, and updates stddef.h to set it when typedeffing wchar_t. llvm-svn: 180918
* [Mips] Support -mmicromips / -mno-micromips command line options.Simon Atanasyan2013-04-141-0/+10
| | | | llvm-svn: 179489
* [Mips] Follow-up to r179481. Consider "single-float" as a separateSimon Atanasyan2013-04-141-0/+6
| | | | | | independent of float ABI feature in the MipsTargetInfoBase class. llvm-svn: 179486
* Define __SIZE_MAX__ preprocessor macro.Evgeniy Stepanov2013-03-281-0/+21
| | | | llvm-svn: 178226
* Add some missing PPC cpusBill Schmidt2013-02-011-0/+145
| | | | llvm-svn: 174215
* Add PPC A2Q core and BG/Q preprocessor definitionsHal Finkel2013-02-011-0/+15
| | | | | | The a2q core is the variant of the a2 core used on the BG/Q supercomputers. llvm-svn: 174151
* s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few ↵Richard Smith2013-01-021-8/+8
| | | | | | nearby 'C++0x' comments. llvm-svn: 171372
* Make __LDBL_MAX__ etc. have the correct type on targets where long ↵Eli Friedman2012-11-101-44/+44
| | | | | | | | double/double/etc. have the same format. PR14285. Based on patch by Jeroen Dobbelaere. llvm-svn: 167649
* Add some ARM EABI preprocessor builtins testsAnton Korobeynikov2012-09-081-0/+209
| | | | llvm-svn: 163467
* Define __mips64 / __mips64__ macros for MIPS 64-bit targets.Simon Atanasyan2012-08-291-0/+4
| | | | | | The patch suggested by Brad Smith. llvm-svn: 162858
* Define _MIPS_ARCH and _MIPS_ARCH_<cpu name> macros for MIPS targets.Simon Atanasyan2012-08-291-0/+8
| | | | | | The patch suggested by Logan Chien. llvm-svn: 162840
* Frontend: define _LP64 in a target-independent wayDylan Noblesmith2012-08-101-0/+30
| | | | | | | | | | | | | | Instead of adding it to each individual subclass in Targets.cpp, simply check the appropriate target values. Where before it was only on x86_64 and ppc64, it's now also defined on mips64 and nvptx64. Also add a bunch of negative tests to ensure it is *not* defined on any other architectures while we're here. llvm-svn: 161685
* Preprocessor: fix __OPTIMIZE_SIZE__ and -OzDylan Noblesmith2012-08-081-19/+29
| | | | | | | | | | | | Add some tests for __OPTIMIZE_SIZE__ and __NO_INLINE__, removing the superfluous copies in the target-specific tests, since it's target-independent. This uncovered a bug in the handling of -Oz: it would attempt to store the value 2 in the 1-bit bitfield OptimizeSize, leaving a value of 0 and never defining __OPTIMIZE_SIZE__. llvm-svn: 161495
* Preprocessor: add __BYTE_ORDER__ predefined macroDylan Noblesmith2012-07-271-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | The __BYTE_ORDER__ predefined macro was added in GCC 4.6: http://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html It's used like the following: #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ... #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ... #else #error insane architecture like the pdp-11 #endif There's a similar macro, __FLOAT_WORD_ORDER__, but it looks like it mainly exist to accommodate fairly obscure architectures and ARM's old FPA instructions, so it doesn't seem nearly as useful. The tests are updated to check for the correct(at least, based on clang's current output) value of the macro on each target. So now the suite will catch bugs like the one fixed in r157626. llvm-svn: 160879
* test/Preprocessor: add NVPTX predefine testsDylan Noblesmith2012-07-271-0/+186
| | | | llvm-svn: 160866
* MIPS: Define __mips_dsp_rev / __mips_dspr2 / __mips_dsp macrosSimon Atanasyan2012-07-051-0/+14
| | | | | | if -mdsp or -mdspr2 options are provided. llvm-svn: 159774
* MIPS: Define __mips16 macro if -mips16 option is provided.Simon Atanasyan2012-07-051-0/+12
| | | | llvm-svn: 159753
* Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall2012-07-031-2/+2
| | | | | | runtime to gnustep from gnu. Fix EH for the GCC runtime. llvm-svn: 159684
* Add additional architecture defines for PPC targets.Hal Finkel2012-07-031-0/+106
| | | | | | Patch by Andy Gibbs. llvm-svn: 159665
* Restructure how the driver communicates information about theJohn McCall2012-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Add PPC support for translating gcc-style -mcpu options into LLVM ↵Hal Finkel2012-06-111-1/+2
| | | | | | | | | | | | | | -target-cpu options. This functionality is based on what is done on ARM, and enables selecting PPC CPUs in a way compatible with gcc's driver. Also, mirroring gcc (and what is done on x86), -mcpu=native support was added. This uses the host cpu detection from LLVM (which will also soon be updated by refactoring code currently in backend). In order for this to work, the target needs a list of valid CPUs -- we now accept all CPUs accepted by LLVM. A few preprocessor defines for common CPU types have been added. llvm-svn: 158334
* Mips: Define __mips_hard_float macro additional to __mips_single_floatSimon Atanasyan2012-06-051-0/+1
| | | | | | when single float ABI is selected. llvm-svn: 157996
* Use the standard values for the __cplusplus macro, even when in GNU mode. GCCRichard Smith2012-05-031-2/+11
| | | | | | | dropped its prior behavior of always defining __cplusplus to 1 in GNU mode in version 4.7. llvm-svn: 156113
* Define __ANDROID__ macro on -androideabi targets.Evgeniy Stepanov2012-04-261-0/+3
| | | | llvm-svn: 155632
* MIPS: Move tests check float ABI macros definitions to the more appropriate ↵Simon Atanasyan2012-04-061-0/+17
| | | | | | place. llvm-svn: 154184
* MIPS: Add tests for predefined macros for MIPS targets.Simon Atanasyan2012-04-061-0/+439
| | | | llvm-svn: 154168
* Fix an ABI problem with ptrdiff_t and intptr_t on PPC32Hal Finkel2012-03-021-2/+2
| | | | | | | | | | ptrdiff_t on PPC32 on Linux, etc. should be int not long. This does not matter for C, but it does matter for C++ because of name mangling. The preprocessor test has been changed accordingly. llvm-svn: 151935
* Fix "long double" and __SIZE_TYPE__ on powerpc, now with test fix.Nico Weber2012-01-311-20/+225
| | | | | | Fixes PR11867. Patch from Jeremy Huddleston! llvm-svn: 149334
* Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 ↵Benjamin Kramer2011-12-281-2/+2
| | | | | | | | | with sse disabled. x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD to "2". llvm-svn: 147311
* AAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and ↵James Molloy2011-11-231-2/+2
| | | | | | | | aapcs-linux. Original behaviour of defining wchar_t as signed int has been kept for apcs-gnu as I don't have any spec for this to validate against. llvm-svn: 145102
* Remove more SystemZ (s390) tests.Dan Gohman2011-10-251-92/+0
| | | | llvm-svn: 142883
* Remove the Blackfin backend.Dan Gohman2011-10-251-97/+0
| | | | llvm-svn: 142881
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
OpenPOWER on IntegriCloud