Only define __SIZEOF_FLOAT128__ on x86 as intended in r304012

GCC only defines it on x86.

llvm-svn: 304013
This commit is contained in:
Reid Kleckner 2017-05-26 17:48:01 +00:00
parent 9eabbb6066
commit a40b38a637
2 changed files with 3 additions and 2 deletions

View File

@ -4165,6 +4165,9 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
}
if (CPU >= CK_i586)
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
if (HasFloat128)
Builder.defineMacro("__SIZEOF_FLOAT128__", "16");
}
bool X86TargetInfo::hasFeature(StringRef Feature) const {

View File

@ -750,8 +750,6 @@ 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);