summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/stdint.c
Commit message (Collapse)AuthorAgeFilesLines
* AArch64: add arm64_32 support to Clang.Tim Northover2019-11-121-0/+107
|
* By popular demand, switch in64_t on NetBSD/AArch64 and NetBSD/PowerPC64Joerg Sonnenberger2018-07-171-20/+20
| | | | | | to long for consistency with other 64bit platforms. llvm-svn: 337271
* Basic: fix __{,U}INTPTR_TYPE__ on ARMSaleem Abdulrasool2017-10-181-5/+5
| | | | | | | | | | Darwin and OpenBSD are the only platforms which use `long int` for `__INTPTR_TYPE__`. The other platforms use `int` in 32-bit, and `long int` on 64-bit (except for VMS and Windows which are LLP64). Adjust the type definitions to match the platform definitions. We now generate the same definition as GCC on all the targets. llvm-svn: 316046
* Headers: Make the type of SIZE_MAX the same as size_tDuncan P. N. Exon Smith2017-04-271-50/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [SystemZ] Fix definition of IntMaxType / Int64TypeUlrich Weigand2015-03-301-10/+10
| | | | | | | | Like on other 64-bit platforms, Int64Type should be SignedLong on SystemZ, not SignedLongLong as per default. This could cause ABI incompatibilities in certain cases (e.g. name mangling). llvm-svn: 233544
* [Mips] Fix type of 64-bit integer in case of MIPS N64 ABISimon Atanasyan2015-01-221-28/+28
| | | | | | Differential Revision: http://reviews.llvm.org/D7127 llvm-svn: 226877
* As requested by Matt Thomas, use long long for intmax_t and int64_t onJoerg Sonnenberger2014-10-151-0/+107
| | | | | | PPC64/NetBSD. llvm-svn: 219839
* Change __INTx_TYPE__ to be always signed. This changes the value forJoerg Sonnenberger2014-07-281-45/+45
| | | | | | | | | | char-based types from "char" to "signed char". Adjust stdint.h to use __INTx_TYPE__ directly without prefixing it with signed and to use __UINTx_TYPE__ for unsigned ones. The value of __INTx_TYPE__ now matches GCC. llvm-svn: 214119
* If char/short are shorter than int, do not use U as suffix forJoerg Sonnenberger2014-07-171-3/+3
| | | | | | | | constants. Comparing int against a constant of the given type like UINT8_MAX will otherwise force a promotion to unsigned int, which is typically not expected. llvm-svn: 213301
* [Mips] Add tests for MIPS/MIPS64 type defines and type limits macros. NoSimon Atanasyan2013-11-141-0/+214
| | | | | | functional changes - just reflection of the current state. llvm-svn: 194690
* XCore target Type defines.Robert Lytton2013-11-121-4/+4
| | | | | | | Change SizeType, PtrDiffType, IntPtrType, WCharType, WIntType to follow the XMOS llvm-gcc front end's settings. llvm-svn: 194461
* Add XCore targetRobert Lytton2013-08-131-0/+108
| | | | llvm-svn: 188258
* Fix MSP430 builtin types.Anton Korobeynikov2013-07-011-5/+5
| | | | | | Patch by Job Noorman! llvm-svn: 185362
* Add SystemZ supportUlrich Weigand2013-05-061-0/+107
| | | | | | | | | | | | | | 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
* 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-107/+0
| | | | llvm-svn: 142883
* Remove the Blackfin backend.Dan Gohman2011-10-251-108/+0
| | | | llvm-svn: 142881
* Some small improvements to the builtin (-ffreestanding) stdint.h; inEli Friedman2011-04-301-1/+7
| | | | | | particular, make sure to handle WCHAR_MIN correctly. llvm-svn: 130618
* PR9772: Fix the definition of WINT_MIN and WINT_MAX on Linux -ffreestanding.Eli Friedman2011-04-211-0/+6
| | | | llvm-svn: 129907
* 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
* Headers: Define __INT64_TYPE__ in terms of getInt64Type(), which isn't alwaysDaniel Dunbar2010-06-301-8/+8
| | | | | | | | '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
* Headers: Change [u]intmax_t to be defined in terms of __[U]INTMAX_TYPE__, ↵Daniel Dunbar2010-06-301-25/+25
| | | | | | instead of intN_t. llvm-svn: 107254
* Forgot to commit theseAnton Korobeynikov2010-01-141-11/+11
| | | | llvm-svn: 93458
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-12/+12
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Avoid unwanted expansion in macros that paste together INT<n>_C(v) and Ken Dyck2009-11-201-2/+2
| | | | | | UINT<n>_C(v) macros. llvm-svn: 89461
* Avoid unwanted expansion in macros that paste together INT<n>_MIN, INT<n>_MAX,Ken Dyck2009-11-201-15/+15
| | | | | | and UINT<n>_MAX defintions. llvm-svn: 89460
* Avoid unwanted macro expansion in macros that paste together int<n>_t andKen Dyck2009-11-201-0/+29
| | | | | | uint<n>_t definitions. llvm-svn: 89459
* Parameterize WINT_MIN and WINT_MAX with __WINT_WIDTH__ to support arbitrary Ken Dyck2009-11-191-4/+4
| | | | | | widths. This corrects the values of these definitions for MSP430 and PIC16. llvm-svn: 89350
* Define intptr_t and uintptr_t in terms of their equivalent exact-width types.Ken Dyck2009-11-181-22/+22
| | | | llvm-svn: 89237
* Define INTMAX_C and UINTMAX_C in terms of the corresponding exact-widthKen Dyck2009-11-181-12/+12
| | | | | | INTn_C and UINTn_C macros. llvm-svn: 89226
* Define INTMAX_MIN, INTMAX_MAX, and UINTMAX_MAX in terms of the limit macros forKen Dyck2009-11-181-15/+15
| | | | | | their corresponding exact-width type. llvm-svn: 89224
* Define intmax_t and uintmax_t as the [u]intN_t type corresponding toKen Dyck2009-11-181-22/+22
| | | | | | __INTMAX_WIDTH__. llvm-svn: 89221
* Replace (-INT8_C(128)), which uses an illegally out-of-range argument forKen Dyck2009-11-171-70/+70
| | | | | | | INT8_C, with (-INT8_C(127)-1) in the definition of INT8_MIN. Apply similar changes to the definitions of INT16_MIN and INT24_MIN. llvm-svn: 89120
* Use the INTn_C integer constant macros to generate limit constants with correctKen Dyck2009-11-171-74/+74
| | | | | | | suffixes. This corrects the suffixes for the limit constants of the 32-bit types on MSP430 and PIC16, and the 64-bit types on PPC64, SystemZ, X86_64. llvm-svn: 89101
* Remove unnecessary parens around the bodies of integer constant macros. C99Ken Dyck2009-11-171-105/+105
| | | | | | | requires that their arguments be decimal, hex, octal constants---no signs allowed---making the parens unnecessary. llvm-svn: 89095
* Parameterize the constant-generating macros in stdint.h with new built-inKen Dyck2009-11-161-10/+10
| | | | | | | __INTn_C_SUFFIX__ macros that are defined for types with corresponding constant suffixes (i.e. long and long long). llvm-svn: 88914
* Generalize stdint.h for non-8-bit-multiple types, patch by Chris Lattner2009-11-121-33/+33
| | | | | | | | | | Ken Dyck! "This adds definitions for types of 8-bit multiples from 8 to 64 to stdint.h and rationalizes the selection of types for the exact-width definitions in InitPreprocessor.cpp." llvm-svn: 86977
* do not store wchar/char16/char32/intmax width/alignment infoChris Lattner2009-11-121-4/+4
| | | | | | | into TargetInfo, just derive this based on the underlying type. This prevents them from getting out of synch, patch by Ken Dyck! llvm-svn: 86976
* Remove RUN: true lines.Daniel Dunbar2009-11-081-1/+0
| | | | llvm-svn: 86432
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-11/+11
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* clean up integer preprocessor type definitions, patch by Ken Dyck!Chris Lattner2009-11-051-4/+4
| | | | llvm-svn: 86177
* A simple reordering of the definitions in stdint.h and Chris Lattner2009-11-041-193/+183
| | | | | | introduces no new function changes. Patch by Ken Dyck! llvm-svn: 86062
* add two new and very exhaustive preprocessor tests, patch byChris Lattner2009-10-291-0/+1244
Ken Dyck! llvm-svn: 85482
OpenPOWER on IntegriCloud