debug: Add TINT_UNIMPLEMENTED()
Use this when we have code TODOs, so we can easily find them. Change-Id: I7720d4cc3a52d51f3c240e86611b4a8eea566a6a Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44863 Auto-Submit: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
parent
15dcd8fb15
commit
50f169dcc8
|
@ -88,6 +88,15 @@ class InternalCompilerError {
|
|||
#define TINT_UNREACHABLE(diagnostics) \
|
||||
TINT_ICE(diagnostics) << "TINT_UNREACHABLE "
|
||||
|
||||
/// TINT_UNIMPLEMENTED() is a macro for appending a "TINT_UNIMPLEMENTED"
|
||||
/// internal compiler error message to the diagnostics list `diagnostics`, and
|
||||
/// calling the InternalCompilerErrorReporter with the full diagnostic list if a
|
||||
/// reporter is set.
|
||||
/// The ICE message contains the callsite's file and line.
|
||||
/// Use the `<<` operator to append an error message to the ICE.
|
||||
#define TINT_UNIMPLEMENTED(diagnostics) \
|
||||
TINT_ICE(diagnostics) << "TINT_UNIMPLEMENTED "
|
||||
|
||||
/// TINT_ASSERT() is a macro for checking the expression is true, triggering a
|
||||
/// TINT_ICE if it is not.
|
||||
/// The ICE message contains the callsite's file and line.
|
||||
|
|
|
@ -106,7 +106,7 @@ void Spirv::HandleEntryPointIOTypes(CloneContext& ctx) const {
|
|||
// TODO(jrprice): Handle structures by moving the declaration and
|
||||
// construction to the function body.
|
||||
if (param->type()->Is<type::Struct>()) {
|
||||
TINT_ICE(ctx.dst->Diagnostics())
|
||||
TINT_UNIMPLEMENTED(ctx.dst->Diagnostics())
|
||||
<< "structures as entry point parameters are not yet supported";
|
||||
continue;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ void Spirv::HandleEntryPointIOTypes(CloneContext& ctx) const {
|
|||
// TODO(jrprice): Hoist the return type out to a global variable, and
|
||||
// replace return statements with variable assignments.
|
||||
if (!func->return_type()->Is<type::Void>()) {
|
||||
TINT_ICE(ctx.dst->Diagnostics())
|
||||
TINT_UNIMPLEMENTED(ctx.dst->Diagnostics())
|
||||
<< "entry point return values are not yet supported";
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue