mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
sem: Remove Type::type_name.
Remove last remaining uses, and fix up a whole lot of tests. Bug: tint:1383 Change-Id: Id2a11fc2d748b72823f4a077bcd6ba7be705a02b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82744 Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
4391975f72
commit
dc0e31cfaa
@@ -264,7 +264,7 @@ DecomposeMemoryAccess::Intrinsic* IntrinsicAtomicFor(ProgramBuilder* builder,
|
||||
default:
|
||||
TINT_ICE(Transform, builder->Diagnostics())
|
||||
<< "invalid IntrinsicType for DecomposeMemoryAccess::Intrinsic: "
|
||||
<< ty->type_name();
|
||||
<< ty->TypeInfo().name;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ struct DecomposeMemoryAccess::State {
|
||||
if (atomic == nullptr) {
|
||||
TINT_ICE(Transform, b.Diagnostics())
|
||||
<< "IntrinsicAtomicFor() returned nullptr for op " << op
|
||||
<< " and type " << el_ty->type_name();
|
||||
<< " and type " << el_ty->TypeInfo().name;
|
||||
}
|
||||
|
||||
auto* ret_ty = CreateASTTypeFor(ctx, intrinsic->ReturnType());
|
||||
|
||||
@@ -119,8 +119,8 @@ struct Robustness::State {
|
||||
auto* idx_sem = ctx.src->Sem().Get(expr->index);
|
||||
auto* idx_ty = idx_sem->Type()->UnwrapRef();
|
||||
if (!idx_ty->IsAnyOf<sem::I32, sem::U32>()) {
|
||||
TINT_ICE(Transform, b.Diagnostics())
|
||||
<< "index must be u32 or i32, got " << idx_sem->Type()->type_name();
|
||||
TINT_ICE(Transform, b.Diagnostics()) << "index must be u32 or i32, got "
|
||||
<< idx_sem->Type()->TypeInfo().name;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -133,10 +133,9 @@ struct Robustness::State {
|
||||
idx.u32 = idx_constant.Elements()[0].u32;
|
||||
idx.is_signed = false;
|
||||
} else {
|
||||
b.Diagnostics().add_error(diag::System::Transform,
|
||||
"unsupported constant value for accessor: " +
|
||||
idx_constant.Type()->type_name(),
|
||||
expr->source);
|
||||
TINT_ICE(Transform, b.Diagnostics())
|
||||
<< "unsupported constant value for accessor "
|
||||
<< idx_constant.Type()->TypeInfo().name;
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -326,7 +326,8 @@ struct ZeroInitWorkgroupMemory::State {
|
||||
}
|
||||
|
||||
TINT_UNREACHABLE(Transform, b.Diagnostics())
|
||||
<< "could not zero workgroup type: " << ty->type_name();
|
||||
<< "could not zero workgroup type: "
|
||||
<< ty->FriendlyName(ctx.src->Symbols());
|
||||
}
|
||||
|
||||
/// DeclareArrayIndices returns a list of statements that contain the `let`
|
||||
|
||||
Reference in New Issue
Block a user