summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
Commit message (Collapse)AuthorAgeFilesLines
* [PS4] Change the names of some "environmental" things to what ourPaul Robinson2016-05-161-1/+1
| | | | | | | | licensees actually see in the toolchain we deliver to them. This will reduce the set of local patches we have to maintain. The triple is not changing. (The term ORBIS is an internal code name for PS4.) llvm-svn: 269671
* ARM-MachO: stop claiming to be EABITim Northover2016-05-131-7/+7
| | | | | | | | | | Embedded ARM MachO targets are AAPCS but not full EABI (we don't use __aeabi_whatever and the functions are allowed to be hard-float). Turns out there was already a test for this, but its original purpose had become corrupted over the years. llvm-svn: 269487
* [Power9] Enable -mcpu=pwr9 (-mcpu=power9) in the front endNemanja Ivanovic2016-05-091-0/+28
| | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D19684 It simply adds the handling for the option and the corresponding macros. llvm-svn: 268951
* Enable support for __float128 in Clang and enable it on pertinent platformsNemanja Ivanovic2016-05-091-0/+3
| | | | | | | | | | | | | | | | | | This patch corresponds to reviews: http://reviews.llvm.org/D15120 http://reviews.llvm.org/D19125 It adds support for the __float128 keyword, literals and target feature to enable it. Based on the latter of the two aforementioned reviews, this feature is enabled on Linux on i386/X86 as well as SystemZ. This is also the second attempt in commiting this feature. The first attempt did not enable it on required platforms which caused failures when compiling type_traits with -std=gnu++11. If you see failures with compiling this header on your platform after this commit, it is likely that your platform needs to have this feature enabled. llvm-svn: 268898
* Fix sysroot-prefix.c on Windows (/ vs \).Nico Weber2016-05-061-3/+3
| | | | llvm-svn: 268797
* test: attempt to repair windows buildSaleem Abdulrasool2016-05-061-12/+9
| | | | | | | | Replace use of /dev/null with /var/empty. lit will substitute the /dev/null include path resulting in failures. Use a path under /var/empty which is supposed to be empty to ensure that we can successfully test. llvm-svn: 268784
* Frontend: support -I=path for sysroot expansionSaleem Abdulrasool2016-05-061-0/+28
| | | | | | | | | | | | | | | | | | From the GCC manpage: -I dir ... If dir begins with =, then the = will be replaced by the sysroot prefix; see --sysroot and -isysroot. Add support to expand the `=` as a prefix of the include path with the sysroot if specified. `-isysroot` takes precedence over `--sysroot` as the normal argument behaviour occurs. The ordering of the `-isysroot` is relevant to the path substituted. If no `--sysroot=` or `-isysroot` option is present, the = is not expanded. Resolves PR26965! llvm-svn: 268777
* [CUDA] Copy host builtin types to NVPTXTargetInfo.Justin Lebar2016-04-291-0/+27
| | | | | | | | | | | | | | | | | Summary: Host and device types must match, otherwise when we pass values back and forth between the host and device, we will get the wrong result. This patch makes NVPTXTargetInfo inherit most of its type information from the host's target info. Reviewers: rsmith Subscribers: cfe-commits, jhen, tra Differential Revision: http://reviews.llvm.org/D19346 llvm-svn: 268131
* [Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABIChris Bieneman2016-04-291-0/+1
| | | | | | | | | | | | Summary: The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build. Reviewers: t.p.northover Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D19693 llvm-svn: 268078
* Add accidentally dropped test to r267880.Tim Northover2016-04-281-0/+10
| | | | | | Forgot "git add". llvm-svn: 267881
* PR27216: Only define __ARM_FEATURE_FMA when the target has VFPv4Silviu Baranga2016-04-281-3/+6
| | | | | | | | | | | | | | | | | | | | | Summary: According to the ACLE spec, "__ARM_FEATURE_FMA is defined to 1 if the hardware floating-point architecture supports fused floating-point multiply-accumulate". This changes clang's behaviour from emitting this macro for v7-A and v7-R cores to only emitting it when the target has VFPv4 (and therefore support for the floating point multiply-accumulate instruction). Fixes PR27216 Reviewers: t.p.northover, rengolin Subscribers: aemerson, rengolin, cfe-commits Differential Revision: http://reviews.llvm.org/D18963 llvm-svn: 267869
* Set the default C standard to C99 when targeting the PS4.Sunil Srivastava2016-04-271-1/+7
| | | | | | | | Patch by Douglas Yung! Differential Revision: http://reviews.llvm.org/D19003 llvm-svn: 267772
* [OpenCL] Add predefined macros.Yaxun Liu2016-04-261-0/+37
| | | | | | | | | | | | OpenCL spec requires __OPENCL_C_VERSION__ to be defined based on -cl-std option. This patch implements that. The patch also defines __FAST_RELAXED_MATH__ based on -cl-fast-relaxed-math option. Also fixed a test using -std=c99 for OpenCL program. Limit allowed language standard of OpenCL to be OpenCL standards. Differential Revision: http://reviews.llvm.org/D19071 llvm-svn: 267590
* [Hexagon] Define architecture version macros for hexagonv55Krzysztof Parzyszek2016-04-211-0/+6
| | | | llvm-svn: 266989
* [Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC.Mandeep Singh Grang2016-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Removed unwanted --check-prefix=CHECK from the following unit tests: test/CXX/special/class.copy/implicit-move-def.cpp test/CodeGen/cleanup-destslot-simple.c test/CodeGen/inline-asm-immediate-ubsan.c test/CodeGen/mips-interrupt-attr.c test/CodeGenCXX/cfi-stats.cpp test/CodeGenCXX/copy-constructor-elim.cpp test/CodeGenCXX/microsoft-templ-uuidof.cpp test/CodeGenCXX/vtable-linkage.cpp test/CodeGenObjC/messages-2.m test/Driver/noinline.c test/Index/remap-load.c test/Index/retain-comments-from-system-headers.c test/OpenMP/task_if_codegen.cpp test/Preprocessor/comment_save_macro.c Patch by: Mandeep Singh Grang (mgrang) Reviewers: rafael, ABataev, rengolin Projects: #clang-c Differential Revision: http://reviews.llvm.org/D19232 llvm-svn: 266843
* [Hexagon] Define macros __HVX__ and __HVXDBL__ when appropriateKrzysztof Parzyszek2016-04-181-0/+26
| | | | llvm-svn: 266647
* [ARM] predefines __ELF__ macro for arm-none-eabiWeiming Zhao2016-04-181-0/+3
| | | | | | | | | | | | Summary: predefines __ELF__ macro for arm-none-eabi Reviewers: silviu.baranga, rengolin Subscribers: aemerson, rengolin, cfe-commits Differential Revision: http://reviews.llvm.org/D19225 llvm-svn: 266625
* Improve diagnostic for the case when a non-defined function-like macro is usedRichard Smith2016-04-162-4/+17
| | | | | | in a preprocessor constant expression. llvm-svn: 266495
* Revert 266186 as it breaks anything that includes type_traits on some platformsNemanja Ivanovic2016-04-151-3/+0
| | | | | | | | | | Since this patch provided support for the __float128 type but disabled it on all platforms by default, some platforms can't compile type_traits with -std=gnu++11 since there is a specialization with __float128. This reverts the patch until D19125 is approved (i.e. we know which platforms need this support enabled). llvm-svn: 266460
* Enable support for __float128 in ClangNemanja Ivanovic2016-04-131-0/+3
| | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D15120 It adds support for the __float128 keyword, literals and a target feature to enable it. This support is disabled by default on all targets and any target that has support for this type is free to add it. Based on feedback that I've received from target maintainers, this appears to be the right thing for most targets. I have not heard from the maintainers of X86 which I believe supports this type. I will subsequently investigate the impact of enabling this on X86. llvm-svn: 266186
* Revert "Set the default C standard to C99 when targeting the PS4."Sean Silva2016-04-061-1/+0
| | | | | | | | | | | | | | | | | This reverts r265359. It breaks - llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast - llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast Failing Tests (5): Clang :: FixIt/fixit-errors.c Clang :: Preprocessor/init.c Clang :: Sema/attr-deprecated.c Clang :: Sema/nullability.c Clang :: SemaObjC/objcbridge-attribute-arc.m llvm-svn: 265601
* [X86] Introduction of -march=lakemont.Andrey Turetskiy2016-04-051-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D18651 llvm-svn: 265405
* Consolidate and improve the handling of built-in feature-like macrosAndy Gibbs2016-04-054-8/+49
| | | | | | | | | | | | | | | | | | Summary: The parsing logic has been separated out from the macro implementation logic, leading to a number of improvements: * Gracefully handle unexpected/invalid tokens, too few, too many and nested parameters * Provide consistent behaviour between all built-in feature-like macros * Simplify the implementation of macro logic * Fix __is_identifier to correctly return '0' for non-identifiers Reviewers: doug.gregor, rsmith Subscribers: rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D17149 llvm-svn: 265381
* Set the default C standard to C99 when targeting the PS4.Sunil Srivastava2016-04-041-0/+1
| | | | | | | | Patch by Douglas Yung! Differential Revision: http://reviews.llvm.org/D18708 llvm-svn: 265359
* Clean up a couple more preprocessor tests to use match-full-lines.James Y Knight2016-04-014-434/+434
| | | | llvm-svn: 265187
* Diagnose missing macro argument following charize operator.Andy Gibbs2016-04-011-1/+12
| | | | | | | For completeness, add a test-case for the equivalent stringize operator diagnostic too. llvm-svn: 265177
* [lanai] Add Lanai backend to clang driver.Jacques Pienaar2016-03-281-0/+3
| | | | | | | | | | Changes to clang to add Lanai backend. Adds a new target, ABI and toolchain. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html). Differential Revision: http://reviews.llvm.org/D17002 llvm-svn: 264655
* Combine identical check-prefixes in Clang ↵Artyom Skrobov2016-03-231-149/+75
| | | | | | | | | | | | test/Preprocessor/arm-target-features.c Reviewers: rengolin, t.p.northover Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D18391 llvm-svn: 264155
* [ARM] Clang tests for ARM Cortex-A32 supportRenato Golin2016-03-211-10/+12
| | | | | | Patch by Sam Parker. llvm-svn: 263957
* Add more ARM Cortex-R8 regression tests to Clang.Pablo Barrio2016-03-162-10/+13
| | | | | | | | | | | | | | Summary: This patch adds Clang tests for Cortex-R8 related to FP capabilities and hardware integer divide. Reviewers: rengolin, bsmith Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D18193 llvm-svn: 263632
* Myriad: define __myriad2 macro automaticallyDouglas Katzman2016-03-151-1/+10
| | | | llvm-svn: 263596
* Test commit - Remove some trailing whitespacePablo Barrio2016-03-151-1/+1
| | | | llvm-svn: 263574
* Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What ↵Richard Smith2016-03-081-0/+10
| | | | | | year is it?!) llvm-svn: 262887
* [X86] AMD Bobcat CPU (btver1) doesn't support XSAVE Simon Pilgrim2016-03-051-2/+0
| | | | | | | | btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't support XSAVE. Differential Revision: http://reviews.llvm.org/D17682 llvm-svn: 262772
* Make TargetInfo store an actual DataLayout instead of a string.James Y Knight2016-03-041-43/+45
| | | | | | | | | | | | | | Use it to calculate UserLabelPrefix, instead of specifying it (often incorrectly). Note that the *actual* user label prefix has always come from the DataLayout, and is handled within LLVM. The main thing clang's TargetInfo::UserLabelPrefix did was to set the #define value. Having these be different from each-other is just silly. Differential Revision: http://reviews.llvm.org/D17183 llvm-svn: 262737
* [ARM] Add Clang targeting for ARMv8-M Baseline/MainlineBradley Smith2016-03-031-0/+36
| | | | llvm-svn: 262619
* [X86] Disabling avx512f should also disable avx512vbmi and avx512ifma. ↵Craig Topper2016-02-292-0/+34
| | | | | | Enabling avx512vbmi or avx512ifma should enable avx512f. Add command line switches and header defines for avx512ifma and avx512vbmi. llvm-svn: 262201
* AMDGPU: Fix broken/confusing predefined macroMatt Arsenault2016-02-271-0/+14
| | | | | | amdgcn should not be defining __R600__ llvm-svn: 262124
* Basic: fix __USER_LABEL_PREFIX__ on CygwinSaleem Abdulrasool2016-02-261-0/+7
| | | | | | | | Adjust the user label prefix for cygwin x86_64. Resolves PR26744. llvm-svn: 262030
* AArch64: fix Cyclone CPU features list.Tim Northover2016-02-241-3/+3
| | | | | | It turns out we don't have CRC after all. Who knew? llvm-svn: 261758
* Added SKL and CNL processors and features to ClangElena Demikhovsky2016-02-211-2/+140
| | | | | | Differential Revision: http://reviews.llvm.org/D16756 llvm-svn: 261467
* Accept "-Weverything" in clang diagnistic pragmasSunil Srivastava2016-02-133-0/+68
| | | | | | Differential Revision: http://reviews.llvm.org/D15095 llvm-svn: 260788
* Relax recently added clang version checks.Tim Northover2016-02-111-11/+11
| | | | | | | You can override the value of these during CMake, and we often use sentinels with more than one digit (not to mention our actual Clang being 700.whatever). llvm-svn: 260596
* [Driver] Add support for Qualcomm's Kryo CPU.Chad Rosier2016-02-111-0/+2
| | | | | | http://reviews.llvm.org/D17124 llvm-svn: 260555
* Use new --match-full-lines FileCheck feature for Preprocessor/init.c.James Y Knight2016-02-111-1008/+1008
| | | | | | | | | This required fixing a few check lines which had omitted trailing characters, and were passing incorrectly (e.g., asserting that __UINT64_C_SUFFIX__ is "UL" instead of the "ULL" that it actually is set to). All were obviously broken tests, not broken code. llvm-svn: 260542
* [ARM] Add command-line options for ARMv8.2-AOliver Stannard2016-02-111-0/+6
| | | | | | | | | | | | | | | | | This allows ARMv8.2-A to be targeted either by using "armv8.2a" in the triple, or by using -march=armv8.2-a (or the alias -march=armv8.2a). The FP16 extension can be enabled with the "+fp16" suffix to the -march or -mcpu option. This is consistent with the AArch64 option, rather than the usual ARM option of -mfpu. We have agreed with the team which will be upstreaming this to GCC that we want to use this new option format for new architecture extensions for both ARM and AArch64. Most of the work for this was done by the TargetParser patch in llvm. Differential Revision: http://reviews.llvm.org/D15040 llvm-svn: 260533
* Fixed preprocessed output of the first token for pragmas.Alexey Bataev2016-02-091-0/+6
| | | | | | | Clang did not expanded macros in the very first token of the pragmas during preprocessed output llvm-svn: 260211
* [SystemZ] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macrosUlrich Weigand2016-02-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_[1248] macros on SystemZ. This fixes a miscompile of GCC C++11 standard library headers due to use of those macros in an ABI-changing manner. See e.g. /usr/include/c++/4.8.5/ext/concurrence.h: // Compile time constant that indicates prefered locking policy in // the current configuration. static const _Lock_policy __default_lock_policy = #ifdef __GTHREADS #if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) \ && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) _S_atomic; #else _S_mutex; #endif #else _S_single; #endif A different choice of __default_lock_policy causes different sizes of several of the C++11 data structures, which are then incompatible when inlined in clang-compiled code with what the (GCC-compiled) external library expects. This in turn leads to various crashes when using std::thread in code compiled with clang, as see e.g. via the ThreadPool unit tests. See PR 26473 for an example. llvm-svn: 259931
* [x86] Correct setting of WIntType for MCU targetAndrey Bokhanko2016-02-041-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D16626 llvm-svn: 259780
* Add -nocudainc option to CUDA preprocessor test.Samuel Antao2016-02-041-5/+5
| | | | | | | | | If include files are used in the CUDA preprocessor tests it will cause a failure due to a missing header file in hosts that do not match the triple in the test. E.g. powerpc64le have CUDA support but the include files cannot be used for an x86 target. llvm-svn: 259769
OpenPOWER on IntegriCloud