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>
diff --git a/src/debug.h b/src/debug.h
index 13c72c2..8c9c7f3 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -88,6 +88,15 @@
 #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.
diff --git a/src/transform/spirv.cc b/src/transform/spirv.cc
index a6f41fe..2c1bb7c 100644
--- a/src/transform/spirv.cc
+++ b/src/transform/spirv.cc
@@ -106,7 +106,7 @@
       // 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 @@
     // 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;
     }