[clang] [NFC][HLSL] Cleanup TargetInfo handling (PR #90694)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Wed May 1 09:38:36 PDT 2024


================
@@ -1612,15 +1612,7 @@ const llvm::fltSemantics &ASTContext::getFloatTypeSemantics(QualType T) const {
   case BuiltinType::Float16:
     return Target->getHalfFormat();
   case BuiltinType::Half:
-    // For HLSL, when the native half type is disabled, half will be treat as
-    // float.
-    if (getLangOpts().HLSL)
-      if (getLangOpts().NativeHalfType)
-        return Target->getHalfFormat();
-      else
-        return Target->getFloatFormat();
-    else
-      return Target->getHalfFormat();
+    return Target->getHalfFormat();
   case BuiltinType::Float:      return Target->getFloatFormat();
----------------
llvm-beanz wrote:

Yea, this code would completely change with clang-format, but the bot only cares about the lines I changed. I tried not to include larger whitespace changes.

https://github.com/llvm/llvm-project/pull/90694


More information about the cfe-commits mailing list