Add support for f16, f64, f128. (#5952)

Generalize the f64 support to support other sizes. Also provide interop
support for `float`, `_Float16`, and `__float128`.

Also lay some groundwork for non-standard floating-point types, though
we don't have any syntax to name them yet.
This commit is contained in:
Richard Smith
2025-08-14 01:14:40 +00:00
committed by GitHub
parent cfe5599144
commit b851e8c423
27 changed files with 826 additions and 379 deletions
+1 -1
View File
@@ -205,7 +205,7 @@ auto EvalConstantInst(Context& context, SemIR::FacetAccessType inst)
auto EvalConstantInst(Context& context, SemIR::InstId inst_id,
SemIR::FloatType inst) -> ConstantEvalResult {
return ValidateFloatType(context, SemIR::LocId(inst_id), inst)
return ValidateFloatTypeAndSetKind(context, SemIR::LocId(inst_id), inst)
? ConstantEvalResult::NewSamePhase(inst)
: ConstantEvalResult::Error;
}