[tint][ir][FromProgram] Ignore diagnostic directives
Change-Id: I7c4dcc641753142e857233e6f4cdac906da079ba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/140991
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/ir/from_program.cc b/src/tint/ir/from_program.cc
index d8e49aa..33ec094 100644
--- a/src/tint/ir/from_program.cc
+++ b/src/tint/ir/from_program.cc
@@ -34,6 +34,7 @@
#include "src/tint/ast/const.h"
#include "src/tint/ast/const_assert.h"
#include "src/tint/ast/continue_statement.h"
+#include "src/tint/ast/diagnostic_directive.h"
#include "src/tint/ast/discard_statement.h"
#include "src/tint/ast/enable.h"
#include "src/tint/ast/float_literal_expression.h"
@@ -225,6 +226,9 @@
[&](const ast::ConstAssert*) {
// Evaluated by the resolver, drop from the IR.
},
+ [&](const ast::DiagnosticDirective*) {
+ // Ignored for now.
+ },
[&](Default) {
add_error(decl->source, "unknown type: " + std::string(decl->TypeInfo().name));
});