mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-24 15:33:42 +00:00
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) \
|
#define TINT_UNREACHABLE(diagnostics) \
|
||||||
TINT_ICE(diagnostics) << "TINT_UNREACHABLE "
|
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_ASSERT() is a macro for checking the expression is true, triggering a
|
||||||
/// TINT_ICE if it is not.
|
/// TINT_ICE if it is not.
|
||||||
/// The ICE message contains the callsite's file and line.
|
/// 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
|
// TODO(jrprice): Handle structures by moving the declaration and
|
||||||
// construction to the function body.
|
// construction to the function body.
|
||||||
if (param->type()->Is<type::Struct>()) {
|
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";
|
<< "structures as entry point parameters are not yet supported";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ void Spirv::HandleEntryPointIOTypes(CloneContext& ctx) const {
|
|||||||
// TODO(jrprice): Hoist the return type out to a global variable, and
|
// TODO(jrprice): Hoist the return type out to a global variable, and
|
||||||
// replace return statements with variable assignments.
|
// replace return statements with variable assignments.
|
||||||
if (!func->return_type()->Is<type::Void>()) {
|
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";
|
<< "entry point return values are not yet supported";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user