diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2018-01-06 21:49:54 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2018-01-06 21:49:54 +0000 |
commit | dfecbe9ad865ad769e36208b21cd31b773d9a323 (patch) | |
tree | e9dd783a5a98a655fa50ce55fe385ebf43288233 /clang/lib/AST/ASTContext.cpp | |
parent | cf93feb9815529acfc4f5de22fe1ba7d35100996 (diff) | |
download | bcm5719-llvm-dfecbe9ad865ad769e36208b21cd31b773d9a323.tar.gz bcm5719-llvm-dfecbe9ad865ad769e36208b21cd31b773d9a323.zip |
Add support for a limited subset of TS 18661-3 math builtins.
These just overloads for _Float128. They're supported by GCC 7 and used
by glibc. APFloat support is already there so just add the overloads.
__builtin_copysignf128
__builtin_fabsf128
__builtin_huge_valf128
__builtin_inff128
__builtin_nanf128
__builtin_nansf128
This is the same support that GCC has, according to the documentation,
but limited to _Float128.
llvm-svn: 321948
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index b9a23ed9642..2e906247cc1 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -8929,10 +8929,12 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, Type = Context.FloatTy; break; case 'd': - assert(HowLong < 2 && !Signed && !Unsigned && + assert(HowLong < 3 && !Signed && !Unsigned && "Bad modifiers used with 'd'!"); - if (HowLong) + if (HowLong == 1) Type = Context.LongDoubleTy; + else if (HowLong == 2) + Type = Context.Float128Ty; else Type = Context.DoubleTy; break; |