[PATCH] D33719: Add _Float16 as a C/C++ source language type

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 5 17:24:51 PDT 2017


rsmith added a comment.

We need to be completely clear on the differences and interactions between `_Float16` and `__fp16`; you should include a documentation update that describes this as part of this change or as a companion change. In particular, an explanation of why we need two different types here is essential.



================
Comment at: lib/AST/ItaniumMangle.cpp:2457-2460
+  case BuiltinType::Float16:
   case BuiltinType::Half:
     Out << "Dh";
     break;
----------------
Distinct types should have distinct manglings. Please open an issue at https://github.com/itanium-cxx-abi/cxx-abi/ to discuss how to mangle these cases.


================
Comment at: lib/Lex/LiteralSupport.cpp:594
+      if (s + 2 < ThisTokEnd && s[1] == '1' && s[2] == '6') {
+          s += 2; // success, eat up 2 tokens.
+          isFloat16 = true;
----------------
s/tokens/characters/


https://reviews.llvm.org/D33719





More information about the cfe-commits mailing list