From bb1ea2d6139a72340b426e114510c46d938645a6 Mon Sep 17 00:00:00 2001 From: Nemanja Ivanovic Date: Mon, 9 May 2016 08:52:33 +0000 Subject: Enable support for __float128 in Clang and enable it on pertinent platforms 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 --- clang/test/Preprocessor/init.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/test/Preprocessor') diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 98be2ac03d1..41f50109c10 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -5827,6 +5827,9 @@ // PPCPOWER8:#define _ARCH_PWR7 1 // PPCPOWER8:#define _ARCH_PWR8 1 // +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-feature +float128 -target-cpu power8 -fno-signed-char < /dev/null | FileCheck -check-prefix PPC-FLOAT128 %s +// PPC-FLOAT128:#define __FLOAT128__ 1 +// // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-unknown-linux-gnu -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC64-LINUX %s // // PPC64-LINUX:#define _ARCH_PPC 1 -- cgit v1.2.3