[clang] [NFC][HLSL] Cleanup TargetInfo handling (PR #90694)
Cooper Partin via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 09:36:57 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();
----------------
coopp wrote:
Existing (not in your new changes): This switch statement is strangely formatted. I seem some cases with the return on the same line as the case: and others on the next line. Maybe this is how clang-format handles this?
Example:
case BuiltinType::Double: return Target->getDoubleFormat();
case BuiltinType::Ibm128:
return Target->getIbm128Format();
https://github.com/llvm/llvm-project/pull/90694
More information about the cfe-commits
mailing list