[Clang] Enable KF and KC mode for [_Complex] __float128
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 28 May 2020 20:48:05 +0000 (15:48 -0500)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 28 May 2020 20:48:15 +0000 (15:48 -0500)
commit9021ce9576e438ae5a6fdb574327d30ea6b67fa8
treef667453f61c053a2daecde166d53a2ecc9f16f0e
parent81b79011a77f97798236af6d716e5d352790d54b
[Clang] Enable KF and KC mode for [_Complex] __float128

The headers provided with recent GNU toolchains for PPC have code that includes
typedefs such as:

typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__KC__)))

This patch allows clang to compile programs that contain
#include <math.h>

with -mfloat128 which it currently fails to compile.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=46068

Differential revision: https://reviews.llvm.org/D80374
clang/include/clang/AST/ASTContext.h
clang/include/clang/Basic/TargetInfo.h
clang/lib/AST/ASTContext.cpp
clang/lib/Basic/TargetInfo.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Sema/attr-mode.c