summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
Commit message (Collapse)AuthorAgeFilesLines
...
* [ARM] Add ACLE enum/wchar size predefinesBradley Smith2014-01-201-0/+9
| | | | llvm-svn: 199642
* MachO: use *-*-*-macho for MachO embedded targets.Tim Northover2014-01-161-0/+5
| | | | | | | | | | | | Previously we had bodged together some hacks mapping MachO embedded targets (i.e. mainly ARM v6M and v7M) to the "*-*-darwin-eabi" triple. This is incorrect in both details (they don't run Darwin and they're not EABI in any real sense). This commit appropriates the existing "MachO" environment for the purpose instead. llvm-svn: 199367
* Move a bunch of tests to directly use the CC1 layer. This at least savesChandler Carruth2014-01-151-1/+1
| | | | | | | | | | | a subprocess invocation which is pretty significant on Windows. It also likely saves a bunch of thrashing the host machine needlessly. Finally it makes the tests much more predictable and less dependent on the host. For example 'header_lookup1.c' was passing '-fno-ms-extensions' just to thwart the host detection adding it into the compilation. By runnig CC1 directly we don't have to deal with such oddities. llvm-svn: 199308
* __has_attribute now understands target-specific attributes. So when you ask ↵Aaron Ballman2014-01-091-1/+11
| | | | | | whether an ARM target has the "interrupt" attribute, it will return true for ARM and MSP430 targets, and false for others. llvm-svn: 198897
* Move MS header search test inputs to Inputs/Reid Kleckner2013-12-276-4/+4
| | | | llvm-svn: 198086
* Implement MSVC header search algorithm in MicrosoftMode.Will Wilson2013-12-276-0/+27
| | | | | | Follows algorithm described here: http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx llvm-svn: 198082
* Added support for mcpu kraitAna Pazos2013-12-061-0/+10
| | | | | | | | | | | | - krait processor currently modeled with the same features as A9. - Krait processor additionally has VFP4 (fused multiply add/sub) and hardware division features enabled. - krait has currently the same Schedule model as A9 - krait cpu flag is not recognized by the GNU assembler yet, it is replaced with march=armv7-a to avoid a lower march from being used. llvm-svn: 196618
* [ARM] Enable FeatureMP for Cortex-A5 by default.Amara Emerson2013-11-251-0/+22
| | | | | | Patch by Oliver Stannard. llvm-svn: 195641
* Add support for Cortex-A12.Richard Barton2013-11-221-0/+20
| | | | | | Patch by Oliver Stannard! llvm-svn: 195449
* [ARM] add basic support for Cortex-A7 and VFPv4 to ClangArtyom Skrobov2013-11-211-0/+25
| | | | llvm-svn: 195359
* Clean up predefined macros for AArch64 to follow ACLE 2.0.Jiangning Liu2013-11-191-14/+19
| | | | llvm-svn: 195068
* [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
* Darwin(ish): we don't want __ARM_EABI__ even on v7a embedded targets.Tim Northover2013-11-111-0/+7
| | | | llvm-svn: 194408
* NetBSD 6.99.26 switched to default rounding mode, so adjustJoerg Sonnenberger2013-11-111-0/+210
| | | | | | | __FLT_EVAL_METHOD__ accordingly. Add test case for this and the SSE2 variances on NetBSD. llvm-svn: 194377
* Make test run reliablyAlp Toker2013-11-051-3/+2
| | | | | | | | llc waits for input on stdin, which was not provided in this test. It was running only thanks to a quirk in the way lit concatenates commands. llvm-svn: 194071
* Simplify test case added in r194059David Majnemer2013-11-051-1/+1
| | | | llvm-svn: 194061
* Lex: Require that '#' be followed by a macro parameter name when preceded by ↵David Majnemer2013-11-051-0/+2
| | | | | | | | | | | | | | | | | | '##' After lexing a '##', we would look ahead and check to see if it was followed by '__VA_ARGS__'. After doing so, we would then go ahead and lex the token. However we would fail in the case where the '##' was followed by a '#' followed by an identifier because we would have lexed the '#' separately from the identifier, bypassing our parameter validation logic. Instead, lex the tokens coming after the '##' later. This fixes PR17804. llvm-svn: 194059
* Driver: Add support for -march=bdver3 on x86.Benjamin Kramer2013-11-041-0/+66
| | | | llvm-svn: 193985
* ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clangBernard Ogden2013-10-291-0/+3
| | | | | | | | Allow users to disable or enable CRC subtarget feature. Differential Revision: http://llvm-reviews.chandlerc.com/D2037 llvm-svn: 193600
* Add driver support for FP, SIMD and crypto defaults.Bernard Ogden2013-10-241-0/+17
| | | | | | | | | Although we wire up a bit for v8fp for macro setting purposes, we don't set a macro yet. Need to ask list about that. Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0 llvm-svn: 193367
* Set the default hardware division features for ARM cpus. Also set it as ↵Silviu Baranga2013-10-211-0/+126
| | | | | | default for A32 armv8. llvm-svn: 193075
* Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware ↵Silviu Baranga2013-10-211-0/+20
| | | | | | divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior. llvm-svn: 193074
* Lex: Don't restrict legal UCNs when preprocessing assemblyJustin Bogner2013-10-211-0/+3
| | | | | | | | | | | | | | | The C and C++ standards disallow using universal character names to refer to some characters, such as basic ascii and control characters, so we reject these sequences in the lexer. However, when the preprocessor isn't being used on C or C++, it doesn't make sense to apply these restrictions. Notably, accepting these characters avoids issues with unicode escapes when GHC uses the compiler as a preprocessor on haskell sources. Fixes rdar://problem/14742289 llvm-svn: 193067
* [Mips] Define __mips_fpr and _MIPS_FPSET macros.Simon Atanasyan2013-10-181-0/+38
| | | | llvm-svn: 192969
* Add preprocessor support for powerpc vsx.Eric Christopher2013-10-161-0/+7
| | | | | | The test should be expanded upon for more powerpc checking. llvm-svn: 192849
* Remove an old, seemingly out of date, comment.Eric Christopher2013-10-161-3/+0
| | | | | | The referenced script no longer seems to exist. llvm-svn: 192848
* Enabling 3DNow! prefetch instruction support for a few AMD processors in theYunzhong Gao2013-10-162-0/+29
| | | | | | | | | | clang front end. This change will allow the __PRFCHW__ macro to be set on these processors and hence include prfchwintrin.h in x86intrin.h header. Support for the intrinsic itself seems to have already been added in r178041. Differential Revision: http://llvm-reviews.chandlerc.com/D1934 llvm-svn: 192829
* Add support for -mcx16, and predefine __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 whenNick Lewycky2013-10-051-0/+4
| | | | | | it is enabled. Also enable it on the same architectures that GCC does. llvm-svn: 192045
* Accept #pragma warning(push, 0) without warningReid Kleckner2013-10-022-2/+7
| | | | | | | | This partially addresses PR17435, but it doesn't actually implement the pragma. If we implement it, we should map levels 1-4 to something like -Wall and level 0 to something like -w. llvm-svn: 191833
* Fix PR 12730: Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for ARMWeiming Zhao2013-09-301-0/+18
| | | | llvm-svn: 191707
* 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
* PR17359: Fix off-by-one OOB on _Pragma("") and an unescaping bugReid Kleckner2013-09-251-0/+3
| | | | | | | Previously the code would reduce a run of backslashes to a single backslash, and now it will properly leave behind every other backslash. llvm-svn: 191382
* Adding -mtbm and -mno-tbm command line options to the clang front end for theYunzhong Gao2013-09-242-1/+11
| | | | | | | | | x86 TBM instruction set. Also adding a __TBM__ macro if the TBM feature is enabled. Otherwise there should be no functionality change to existing features. Phabricator code review is located here: http://llvm-reviews.chandlerc.com/D1693 llvm-svn: 191326
* [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and passSimon Atanasyan2013-09-241-0/+5
| | | | | | this option to the assembler. llvm-svn: 191282
* Add C intrinsics for Intel SHA ExtensionsBen Langmuir2013-09-191-0/+17
| | | | | | | | | Intrinsics added shaintrin.h, which is included from x86intrin.h if __SHA__ is enabled. SHA implies SSE2, which is needed for the __m128i type. Also add the -msha/-mno-sha option. llvm-svn: 190999
* Make Preprocessor::Lex non-recursive.Eli Friedman2013-09-192-6/+21
| | | | | | | | | | | | | | | Before this patch, Lex() would recurse whenever the current lexer changed (e.g. upon entry into a macro). This patch turns the recursion into a loop: the various lex routines now don't return a token when the current lexer changes, and at the top level Preprocessor::Lex() now loops until it finds a token. Normally, the recursion wouldn't end up being very deep, but the recursion depth can explode in edge cases like a bunch of consecutive macros which expand to nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this patch). <rdar://problem/14569770> llvm-svn: 190980
* Disabling sse2 should disable aes and pclmul support.Craig Topper2013-09-191-0/+24
| | | | llvm-svn: 190977
* [ARMv8] Add builtins for CRC instructions.Joey Gouly2013-09-181-0/+11
| | | | | | Patch by Bradley Smith! llvm-svn: 190931
* Add the intrinsic __builtin_convertvectorHal Finkel2013-09-181-0/+1
| | | | | | | | | | | | | | | | | | LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. llvm-svn: 190915
* Make F16C feature imply AVX. Matches GCC behavior.Craig Topper2013-09-161-0/+10
| | | | llvm-svn: 190776
* Lex and ignore Microsoft's #pragma warning(...)Reid Kleckner2013-09-132-0/+26
| | | | | | | | | | | | | | | | | Summary: This fixes PR17145 and avoids unknown pragma warnings. This change does not attempt to map MSVC warning numbers to clang warning flags. Perhaps in the future we will implement a mapping for some common subset of Microsoft warnings, but for now we don't. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1652 llvm-svn: 190726
* Fix a bug where -msse followed by -mno-sse would leave MMX enabled.Craig Topper2013-09-111-0/+12
| | | | llvm-svn: 190496
* Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.Craig Topper2013-09-101-0/+12
| | | | | | | Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled. Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled. llvm-svn: 190387
* 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-042-2/+2
| | | | llvm-svn: 189910
* Add support for -march=slm, aka Intel Atom Silvermont.Benjamin Kramer2013-08-301-0/+36
| | | | llvm-svn: 189670
* Properly escape filenames in line directives.Eli Friedman2013-08-291-0/+3
| | | | | | | Fixes PR17018. Only partial test coverage because I don't want to try to write a test which generates a file whose name contains a newline. llvm-svn: 189557
* Fix "//" comments with -traditional-cpp in C++.Eli Friedman2013-08-281-2/+4
| | | | | | | | | Apparently, gcc's -traditional-cpp behaves slightly differently in C++ mode; specifically, it discards "//" comments. Match gcc's behavior. <rdar://problem/14808126> llvm-svn: 189515
OpenPOWER on IntegriCloud