summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
Commit message (Collapse)AuthorAgeFilesLines
* Add missing test file for r201615Reid Kleckner2014-02-181-0/+3
| | | | llvm-svn: 201617
* Fix false positives in -Wmsvc-include by continuing header searchReid Kleckner2014-02-182-1/+5
| | | | | | | | | | | This makes Clang and LLVM -Wmsvc-include clean. I believe the correct behavior here is to avoid updating the cache when we find the header via MSVC's search rules. Differential Revision: http://llvm-reviews.chandlerc.com/D2733 llvm-svn: 201615
* Fix broken CHECK linesNico Rieck2014-02-162-2/+2
| | | | llvm-svn: 201477
* Fix broken RUN linesNico Rieck2014-02-161-5/+5
| | | | llvm-svn: 201475
* Move test inputs into the Inputs directory (improvement/fix to r201419)David Blaikie2014-02-153-1/+1
| | | | llvm-svn: 201458
* If the headermap maps the filename to a framework include ("Foo.h" -> ↵Argyrios Kyrtzidis2014-02-143-0/+12
| | | | | | | | | | | | | | "Foo/Foo.h"), continue header lookup using the framework include as filename. This allows us to conveniently treat #import "Foo.h" as an implicit module import if we can resolve "Foo/Foo.h" as such. rdar://16042979 llvm-svn: 201419
* Enable AArch64 NEON by default.Jiangning Liu2014-02-141-2/+2
| | | | llvm-svn: 201384
* Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__David Majnemer2014-02-091-0/+26
| | | | | | | | | | TargetInfo::getSuitableAlign() was introduced in r146762 and is defined as alignof(std::max_align_t). Introduce __ALIGNOF_MAX_ALIGN_T__ which exposes getSuitableAlign() so that libc++ may take advantage of it. llvm-svn: 201037
* Fix the range for Malayam UCNs in C99.Joey Gouly2014-02-051-1/+1
| | | | llvm-svn: 200845
* Fix whitespace handling in empty macro expansionsJustin Bogner2014-02-041-3/+33
| | | | | | | | | | | | | When a macro expansion does not result in any tokens, and the macro name is preceded by whitespace, the whitespace should be passed to the first token that follows the macro expansion. Similarly when a macro expansion ends with a placemarker token, and that placemarker token is preceded by whitespace. This worked already for top-level macro expansions, but is now extended to also work for nested macro expansions. Patch by Harald van Dijk! llvm-svn: 200787
* Fix whitespace handling in empty macro argumentsJustin Bogner2014-02-041-0/+7
| | | | | | | | | | | | | When a function-like macro definition ends with one of the macro's parameters, and the argument is empty, any whitespace before the parameter name in the macro definition needs to be preserved. Promoting the existing NextTokGetsSpace to a preserved bit-field and checking it at the end of the macro expansion allows it to be moved to the first token following the macro expansion result. Patch by Harald van Dijk! llvm-svn: 200786
* Fix whitespace handling in ## operatorJustin Bogner2014-02-042-3/+17
| | | | | | | | | | | | | | | | | In x ## y, where x and y are regular tokens, whitespace between x and ## is ignored, and whitespace between ## and y is also ignored. When either x or y is a function argument, whitespace was preserved, but it should not be. This patch removes the checks for whitespace before ## and before y, and in the special case where x is an empty macro argument and y is a regular token, actively removes whitespace before y. One existing test is affected by that change, but as clang's output now matches the standard's requirements and that of GCC, I've tweaked the testcase. Patch by Harald van Dijk! llvm-svn: 200785
* Test pre-defined macros of aarch64-netbsd.Joerg Sonnenberger2014-02-021-0/+100
| | | | llvm-svn: 200656
* Revert "Fix assertion failures on annot_* tokens in clang -E"Ben Langmuir2014-01-303-10/+0
| | | | | | | This is causing a failure in the msan buildbot that I am having trouble reproducing. Reverting until I can figure out what went wrong. llvm-svn: 200492
* Fix assertion failures on annot_* tokens in clang -EBen Langmuir2014-01-303-0/+10
| | | | | | | In particular, #pragma clang __debug, and #include implicitly changed into @import were causing assertion failures. llvm-svn: 200475
* [Mips] Fix __mips macro definition.Simon Atanasyan2014-01-271-4/+4
| | | | llvm-svn: 200223
* [Mips] Change default CPU for MIPS 32/64 targets. Now they are ↵Simon Atanasyan2014-01-271-12/+12
| | | | | | mips32r2/mips64r2 respectively. llvm-svn: 200222
* [Mips] Add tests to check MIPS arch macros.Simon Atanasyan2014-01-271-0/+44
| | | | llvm-svn: 200221
* PR18465: [Thumbv8] add predefined macrosWeiming Zhao2014-01-221-0/+20
| | | | | | | | | | currently, for thumbv8, two predefined macros are missing: define __THUMB_INTERWORK__ 1 define __THUMB_INTERWORK__ 1 This patch adds them for thumbv8. llvm-svn: 199819
* [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
OpenPOWER on IntegriCloud