diff --git a/src/inspector/inspector_test.cc b/src/inspector/inspector_test.cc index 00bc302b39..2dddfbeec0 100644 --- a/src/inspector/inspector_test.cc +++ b/src/inspector/inspector_test.cc @@ -18,6 +18,7 @@ #include "src/ast/stage_decoration.h" #include "src/ast/struct_block_decoration.h" #include "src/ast/workgroup_decoration.h" +#include "src/program_builder.h" #include "src/sem/depth_texture_type.h" #include "src/sem/external_texture_type.h" #include "src/sem/multisampled_texture_type.h" diff --git a/src/program_builder.h b/src/program_builder.h index 55995b54ba..8a38e182f6 100644 --- a/src/program_builder.h +++ b/src/program_builder.h @@ -78,6 +78,10 @@ #include "src/sem/vector_type.h" #include "src/sem/void_type.h" +#ifdef INCLUDE_TINT_TINT_H_ +#error "internal tint header being #included from tint.h" +#endif + namespace tint { // Forward declarations diff --git a/src/writer/hlsl/generator.cc b/src/writer/hlsl/generator.cc index 7fdc28ab4f..d55e70c814 100644 --- a/src/writer/hlsl/generator.cc +++ b/src/writer/hlsl/generator.cc @@ -14,6 +14,8 @@ #include "src/writer/hlsl/generator.h" +#include "src/writer/hlsl/generator_impl.h" + namespace tint { namespace writer { namespace hlsl { diff --git a/src/writer/hlsl/generator.h b/src/writer/hlsl/generator.h index 614a62daf3..3623dd59d9 100644 --- a/src/writer/hlsl/generator.h +++ b/src/writer/hlsl/generator.h @@ -18,13 +18,15 @@ #include #include -#include "src/writer/hlsl/generator_impl.h" #include "src/writer/text.h" namespace tint { namespace writer { namespace hlsl { +// Forward declarations +class GeneratorImpl; + /// Class to generate HLSL source class Generator : public Text { public: diff --git a/src/writer/spirv/generator.cc b/src/writer/spirv/generator.cc index d000b11548..8a1e5980e1 100644 --- a/src/writer/spirv/generator.cc +++ b/src/writer/spirv/generator.cc @@ -14,6 +14,8 @@ #include "src/writer/spirv/generator.h" +#include "src/writer/spirv/binary_writer.h" + namespace tint { namespace writer { namespace spirv { @@ -35,6 +37,10 @@ bool Generator::Generate() { return true; } +const std::vector& Generator::result() const { + return writer_->result(); +} + } // namespace spirv } // namespace writer } // namespace tint diff --git a/src/writer/spirv/generator.h b/src/writer/spirv/generator.h index b5b1614474..5227a3f499 100644 --- a/src/writer/spirv/generator.h +++ b/src/writer/spirv/generator.h @@ -19,13 +19,16 @@ #include #include -#include "src/writer/spirv/binary_writer.h" #include "src/writer/writer.h" namespace tint { namespace writer { namespace spirv { +/// Forward declarations +class Builder; +class BinaryWriter; + /// Class to generate SPIR-V from a Tint program class Generator : public writer::Writer { public: @@ -41,7 +44,7 @@ class Generator : public writer::Writer { bool Generate() override; /// @returns the result data - const std::vector& result() const { return writer_->result(); } + const std::vector& result() const; private: std::unique_ptr builder_;