diff options
author | Erich Keane <erich.keane@intel.com> | 2019-01-25 18:36:20 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2019-01-25 18:36:20 +0000 |
commit | e3f289c96976b35162d2d60a4d16bc73e4e4ad31 (patch) | |
tree | a46a6cd51efefa10c9dd1183cabe56cd61ed76cd /clang/lib | |
parent | db3f9774eefc662cbcf976b51f459c80d2664d82 (diff) | |
download | bcm5719-llvm-e3f289c96976b35162d2d60a4d16bc73e4e4ad31.tar.gz bcm5719-llvm-e3f289c96976b35162d2d60a4d16bc73e4e4ad31.zip |
Remove F16 literal support based on Float16 support.
Float16 support was disabled recently on many platforms, however that
commit still allowed literals of Float16 type to work. This commit
removes those based on the same logic as Float16 disable.
Change-Id: I72243048ae2db3dc47bd3d699843e3edf9c395ea
llvm-svn: 352229
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Lex/LiteralSupport.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp index 834c80780d1..b9ee3190f56 100644 --- a/clang/lib/Lex/LiteralSupport.cpp +++ b/clang/lib/Lex/LiteralSupport.cpp @@ -616,10 +616,11 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isHalf || isFloat || isLong || isFloat128) break; // HF, FF, LF, QF invalid. - if (s + 2 < ThisTokEnd && s[1] == '1' && s[2] == '6') { - s += 2; // success, eat up 2 characters. - isFloat16 = true; - continue; + if (PP.getTargetInfo().hasFloat16Type() && s + 2 < ThisTokEnd && + s[1] == '1' && s[2] == '6') { + s += 2; // success, eat up 2 characters. + isFloat16 = true; + continue; } isFloat = true; |