summaryrefslogtreecommitdiff
path: root/test/Preprocessor
Commit message (Collapse)AuthorAge
* ARM: Correctly identify cortex-m4 as v7em.Jim Grosbach2014-06-26
| | | | | | | | | | | Get the predefined macro for the architecture correct. cortex-m4: __ARM_ARCH_7EM__ cortex-m3: __ARM_ARCH_7M__ cortex-m0: __ARM_ARCH_6M__ rdar://17420090 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211792 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ppc64/power8 as a targetWill Schmidt2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211778 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement predefined stdint macrosJF Bastien2014-06-25
| | | | | | | | | | | | | Add predefined stdint macros that match the given patterns: U?INT{_,_FAST,_LEAST}{8,16,32,64}_{MAX,TYPE} U?INT{PTR,MAX}_{MAX,TYPE} http://reviews.llvm.org/D4141 Author: binji git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211657 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -std=c++1z flag for C++17 features.Richard Smith2014-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211030 91177308-0d34-0410-b5e6-96231b3b80d8
* test: add missed file in previous commitSaleem Abdulrasool2014-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210992 91177308-0d34-0410-b5e6-96231b3b80d8
* Preprocessor: improve ACLE 6.4.1, 6.4.2 supportSaleem Abdulrasool2014-06-15
| | | | | | | | | | | | | | | | | | This improves conformance with ACLE 6.4.1. Define additional macros that indicate support for the ARM and Thumb instruction set architecture. This includes the following set of macros: __ARM_ARCH __ARM_ARCH_ISA_ARM __ARM_ARCH_ISA_THUMB __ARM_32BIT_STATE These help identify the environment that the code is intended to execute on. Adjust the handling for ACLE 6.4.2 to be more correct. We would define the profile as a free-standing token rather than a quoted single character. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210991 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add default features for CPUs on AArch64 target.Kevin Qin2014-06-11
| | | | | | | | | | For ARM target, we can use CRYPTO and CRC features if we select cortex-a57 by '-mcpu', but for AArch64 target, it doesn't work unless adding with '-mfpu=crypto-neon-fp-armv8'. To keep consistency between front-end and back-end and get end-users more easier to use, we'd better add default feature for CPUs on AArch64 target as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210625 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Add macros _MIPS_ISA and __mips_isa_rev (same expansion as defined by ↵Matheus Almeida2014-06-05
| | | | | | | | | | | | | | GCC). Summary: The Linux Kernel is one example of a piece of software that relies on them. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3756 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210270 91177308-0d34-0410-b5e6-96231b3b80d8
* Preprocessor: make C++ operator names as macro identifiers a compatible ↵Alp Toker2014-05-31
| | | | | | | | | | | extension With recent changes, this is now a compatible language extension and can be safely enabled with -ms-extensions instead of requiring the full -ms-compatibility MSVC drop-in mode. As such we can now also emit an extension warning under -Wmicrosoft to help users port their code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209978 91177308-0d34-0410-b5e6-96231b3b80d8
* Preprocessor: recover gracefully when C++ operator names are used as macro ↵Alp Toker2014-05-31
| | | | | | | | | | identifiers This failure mode shows up occasionally when users try to include C headers in C++ projects or when porting from Windows. We might as well recover in the way the user expected, thus avoiding confusing diagnostic messages at point of use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209963 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide an aka for the C++ operator name macro diagnosticAlp Toker2014-05-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209322 91177308-0d34-0410-b5e6-96231b3b80d8
* Preprocessor: support defined() with operator names for MS compatibilityAlp Toker2014-05-21
| | | | | | | | | Also flesh out missing tests, improve diagnostic QOI and fix a couple of corner cases found in the process. Fixes PR10606. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209276 91177308-0d34-0410-b5e6-96231b3b80d8
* Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwindJoerg Sonnenberger2014-05-13
| | | | | | | instructions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208719 91177308-0d34-0410-b5e6-96231b3b80d8
* Test preprocessor defines for NetBSD/ARM.Joerg Sonnenberger2014-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208718 91177308-0d34-0410-b5e6-96231b3b80d8
* Target: fix wchar_t definition for Windows on ARMSaleem Abdulrasool2014-05-04
| | | | | | | | Windows on ARM uses AAPCS, but has some deviations. wchar_t remains an unsigned short on WoA, which does not conform to AAPCS. Ensure that wchar_t is defined accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207929 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -march=bdver4.Benjamin Kramer2014-05-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207848 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64/AArch64] Define the correct value for __ARM_NEON_FPBradley Smith2014-05-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207842 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64/AArch64] Hook up CRC32 subtarget feature to the driverBradley Smith2014-05-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207841 91177308-0d34-0410-b5e6-96231b3b80d8
* do not warn about unknown pragmas in modes that do not handle them (pr9537)Lubos Lunak2014-05-01
| | | | | | | | | And refactor to have just one place in code that sets up the empty pragma handlers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207758 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix and restore the macro-multiline.c testAlp Toker2014-04-19
| | | | | | | | | | | | | This test didn't work as intended and was ultimately disabled some years ago in r169458. Indeed it's not clear if the '\n' was ever passed through to the driver correctly given that lit would insert '&& {' at the newline. Test rewritten to use printf/xargs to insert '\n' in a more reliable manner and to use FileCheck for verification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206703 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64] Add ARM64 RUN lines to a bunch of tests that had AARCH64 RUN lines.James Molloy2014-04-17
| | | | | | | This covers all tests in tests/Driver and tests/Preprocessor, but there are some failing tests in test/Sema that need looking into. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206464 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Move -fms-extensions predefined macros into InitPreprocessor"Reid Kleckner2014-04-16
| | | | | | | | | | This reverts commit r206413. This was proposed before, but it's not clear if this is really a good idea: http://reviews.llvm.org/D3034 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206415 91177308-0d34-0410-b5e6-96231b3b80d8
* Move -fms-extensions predefined macros into InitPreprocessorReid Kleckner2014-04-16
| | | | | | | If someone on Linux asks for -fms-extensions, there's no reason not to define the feature test macros that MSVC defines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206413 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64] Allow the disabling of NEON and crypto instructions. Update tests to ↵James Molloy2014-04-16
| | | | | | pass -target-feature +neon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206394 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64] Fix up predefines, including adding big endian support to Targets.cppJames Molloy2014-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206390 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: add target definition for Windows on ARMSaleem Abdulrasool2014-04-04
| | | | | | | | | This introduces the definitions needed for the Windows on ARM target. Add target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI environment. The Visual Studio definitions correspond to the definitions provided by Visual Studio 2012. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205650 91177308-0d34-0410-b5e6-96231b3b80d8
* Put macro redefinition warnings under -Wmacro-redefinedReid Kleckner2014-04-04
| | | | | | | | | | | This is consistent with -Wbuiltin-macro-redefined, and puts this common extension warning under a flag. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D3283 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205591 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/Preprocessor/headermap-rel2.c: Recognize dos path.NAKAMURA Takumi2014-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205152 91177308-0d34-0410-b5e6-96231b3b80d8
* Force a header file input to the headermap test to have differentChandler Carruth2014-03-30
| | | | | | | | | | | | | | | | | | | | | | | | contents than the header file by the same name under the system header search root. Surprisingly, this is required to get the test to pass on some systems. So, it turns out that there exist filesystems in the world which unique the inode of all files based on their contents. This results in two files with the same contents at different paths suddenly having the same inode. This doesn't actually cause any problems in practice as the contents are the same, and the path used to access the files are the same. However, it can cause tests like this one to be more brittle because the file manager ends up de-duplicating the file entries by inode. We don't have any other really easy ways to observe the behavior shift because the whole point is that the #include written in the source code doesn't contain the information -- instead it is contained in the header map. If folks have other solutions they would prefer, I'm more than happy to work on them, but this seems a reasonable way to ensure that the test in question exercises the code it wants to exercise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205149 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Add a triple to the test.Argyrios Kyrtzidis2014-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205073 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Add a RUN line to get a hint on why the test is failing at the buildbots.Argyrios Kyrtzidis2014-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205072 91177308-0d34-0410-b5e6-96231b3b80d8
* [HeaderSearch] Make sure we clear the mapped name from the ↵Argyrios Kyrtzidis2014-03-29
| | | | | | | | LookupFileCacheInfo when we reset the start point. rdar://16462455 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205071 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ARM big endian Target (armeb, thumbeb)Christian Pirker2014-03-28
| | | | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D3096 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205008 91177308-0d34-0410-b5e6-96231b3b80d8
* From Matt Thomas: use long long for [u]int64_t and [u]intmax_t onJoerg Sonnenberger2014-03-26
| | | | | | | NetBSD/aarch64 to simplify code sharing with NetBSD/arm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204798 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the powerpc64le check to include CALL_ELF=2 check.Will Schmidt2014-03-24
| | | | | | | | | | | This is a testcase follow-up to r204627. (see also r204614 for CALL_ELF usage). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204669 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64_BE test case for predefined macrosChristian Pirker2014-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204604 91177308-0d34-0410-b5e6-96231b3b80d8
* [HeaderSearch] Fix issue where if a headermap entry maps the filename to a ↵Argyrios Kyrtzidis2014-03-11
| | | | | | | | | | framework import (non-absolute path) then we fail to find it if it is re-included later on. rdar://16285490 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203542 91177308-0d34-0410-b5e6-96231b3b80d8
* Make __LITTLE_ENDIAN__/__BIG_ENDOAN__ common PredefinedMacrosRobert Lytton2014-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203455 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__"David Majnemer2014-03-02
| | | | | | | | This commit reverts r201037, it's functionality is not needed given the definition of std::max_align_t in libcxx circa r201843. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202667 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/Preprocessor/init.c: Split conditions to win32 and non-win32.NAKAMURA Takumi2014-02-25
| | | | | | FIXME: Implement and check x86_64-cygwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202094 91177308-0d34-0410-b5e6-96231b3b80d8
* If preprocessing results in a token with leading whitespace that was expandedRichard Smith2014-02-24
| | | | | | | | from a macro in column 0, ensure that we print whitespace before it in the -E output. Patch by Harald van Dijk! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202070 91177308-0d34-0410-b5e6-96231b3b80d8
* If the first token in a macro that appears at the start of a line expands toRichard Smith2014-02-24
| | | | | | | | nothing, be sure to inform the *next* token expanded from the macro that it is now at the start of a line. Patch by Harald van Dijk! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202068 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -fno-short-wcharRichard Barton2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202058 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Change int64_t from 'long long int' to 'long int' for AArch64 target.Kevin Qin2014-02-24
| | | | | | | | | | Most 64-bit targets define int64_t as long int, and AArch64 should make same definition to follow LP64 model. In GNU tool chain, int64_t is defined as long int for 64-bit target. So to get consistent with GNU, it's better Changing int64_t from 'long long int' to 'long int', otherwise clang will get different name mangling suffix compared with g++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202004 91177308-0d34-0410-b5e6-96231b3b80d8
* Update __cplusplus to match the value in the C++14 DIS preview (D3937).Richard Smith2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202003 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand macros in pragmas with -fms-extensions and -EReid Kleckner2014-02-20
| | | | | | | | | | | | | | gcc never expands macros in pragmas and MSVC always expands macros before processing pragmas. Clang usually allows macro expansion, except in a handful of pragmas, most of which are handled by the lexer. Also remove PPCallbacks for pragmas that are currently handled in the parser. Without a Parser, such as with clang -E, these callbacks would never be called. Fixes PR18576. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201821 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing test file for r201615Reid Kleckner2014-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201617 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix false positives in -Wmsvc-include by continuing header searchReid Kleckner2014-02-18
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201615 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken CHECK linesNico Rieck2014-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201477 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken RUN linesNico Rieck2014-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201475 91177308-0d34-0410-b5e6-96231b3b80d8