aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-26 17:38:15 +0000
committerReid Kleckner <rnk@google.com>2017-05-26 17:38:15 +0000
commit9eabbb6066292b9df7aa3eb33527148a161019f3 (patch)
treeedac8bc08c7a86d40bd483129792cd8730a9b56e /clang/lib/Frontend/InitPreprocessor.cpp
parent1f9cab6b1c7746479b90f0d0bebfa38bef2e2f43 (diff)
downloadllvm-9eabbb6066292b9df7aa3eb33527148a161019f3.zip
llvm-9eabbb6066292b9df7aa3eb33527148a161019f3.tar.gz
llvm-9eabbb6066292b9df7aa3eb33527148a161019f3.tar.bz2
Enable __float128 for mingw for GCC compatibility and define __SIZEOF_FLOAT128__ on x86
GCC defines __FLOAT128__ on Power and __SIZEOF_FLOAT128__ on x86. We're just following the inconsistency for now so users have some way to test. Effectively merges this patch as requested by Martell Malone: https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-clang/0107-enable-__float128-for-X86-MinGW.patch llvm-svn: 304012
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 08befb3..fb788c4 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -750,6 +750,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
TI.getTypeWidth(TI.getWIntType()), TI, Builder);
if (TI.hasInt128Type())
DefineTypeSizeof("__SIZEOF_INT128__", 128, TI, Builder);
+ if (TI.hasFloat128Type())
+ DefineTypeSizeof("__SIZEOF_FLOAT128__", 128, TI, Builder);
DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Builder);
DefineFmt("__INTMAX", TI.getIntMaxType(), TI, Builder);