[tint] Add missing includes
When Tint is built with only the SPIR-V reader and WGSL writer enabled
(e.g. because it's being used for SPIR-V to WGSL conversion and
nothing else), we need to explicitly include the ir::Module header.
We also need `tint::Program` when the WGSL writer is enabled, for the
program printer.
Change-Id: I47f0f48dd173c4f16bffb7e5a0548193ea62b634
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/260794
Reviewed-by: Peter McNeeley <petermcneeley@google.com>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/tint/api/tint.cc b/src/tint/api/tint.cc
index 8d3a63f..b107242 100644
--- a/src/tint/api/tint.cc
+++ b/src/tint/api/tint.cc
@@ -60,11 +60,16 @@
#endif
#if TINT_BUILD_WGSL_WRITER
+#include "src/tint/lang/wgsl/program/program.h"
#include "src/tint/lang/wgsl/writer/writer.h" // nogncheck
#endif
// IWYU pragma: end_keep
+#if TINT_BUILD_SPV_READER && TINT_BUILD_WGSL_WRITER
+#include "src/tint/lang/core/ir/module.h"
+#endif
+
namespace tint {
/// Initialize initializes the Tint library. Call before using the Tint API.