summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/init.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-021-3/+3
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* Begin fixing Clang's predefined macros for various architectures. ThisChandler Carruth2011-09-281-12/+0
| | | | | | | | | | | | | | | | is *very* much a WIP that I'll be refining over the next several commits, but I need to get this checkpoint in place for sanity. This also adds a much more comprehensive test for architecture macros, which is roughly generated by inspecting the behavior of a trunk build of GCC. It still requires some massaging, but eventually I'll even check in the script that generates these so that others can use it to append more tests for more architectures, etc. Next up is a bunch of simplification of the Targets.cpp code, followed by a lot more test cases once we can reject invalid architectures. llvm-svn: 140673
* Only predefine the __EXCEPTIONS macro if C++ exceptions are turned on.Douglas Gregor2011-09-121-1/+1
| | | | | | | Only predefine the OBJC_ZEROCOST_EXCEPTIONS macro if Objective-C exceptions are turned on. Fixes PR10910. llvm-svn: 139496
* Define __cplusplus to 201103L when in (non-GNU) C++0x mode.Douglas Gregor2011-06-201-1/+1
| | | | llvm-svn: 133437
* Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin ↵Francois Pichet2011-04-281-4/+0
| | | | | | | | | | | | | | defines to real types. Otherwise statements like: __int64 var = __int64(0); would be expanded to: long long var = long long(0); and fail to compile. llvm-svn: 130369
* Move all of the logic for __DEPRECATED to the driver based on commentsChandler Carruth2011-04-231-3/+5
| | | | | | from dgregor. llvm-svn: 130066
* Change Clang's __VERSION__ to include the same basic info as in clang -v.Daniel Dunbar2011-03-311-1/+1
| | | | | | - Please never ever ever ever write a tool that sniffs this. llvm-svn: 128599
* wint_t is defined as 'unsigned int' on Linux. Fixes PR8938.Douglas Gregor2011-01-121-0/+204
| | | | llvm-svn: 123320
* Per discussion with Sanjiv, remove the PIC16 target from mainline. When/ifChris Lattner2010-10-111-100/+0
| | | | | | | it comes back, it will be largely a rewrite, so keeping the old codebase in tree isn't helping anyone. llvm-svn: 116191
* Define _INTEGRAL_MAX_BITS for the win32 and win64 targets, from Per Lindén!Douglas Gregor2010-08-061-1/+2
| | | | llvm-svn: 110442
* PR7795: Fix the definition of __WCHAR_MAX__ with -fshort-wchar.Eli Friedman2010-08-031-0/+7
| | | | llvm-svn: 110126
* Headers: Define __INT64_TYPE__ in terms of getInt64Type(), which isn't alwaysDaniel Dunbar2010-06-301-1/+1
| | | | | | | | 'long'. The practical upshot is so that the uint64_t we define in our stdint.h ends up being compatible with that defined by gcc (at least on Darwin), which otherwise could lead to type incompatibilities with other system headers. llvm-svn: 107255
OpenPOWER on IntegriCloud