[spirv] Remove PrintModule function
This is no longer used or needed. Also remove the Printer::Module()
method which was only used by PrintModule().
Change-Id: Ib387cd5c46bc396c4ddc0c03d85c00a4a0ae3ed6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/204094
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
diff --git a/src/tint/lang/spirv/writer/printer/printer.cc b/src/tint/lang/spirv/writer/printer/printer.cc
index 043f427..8d8af5c 100644
--- a/src/tint/lang/spirv/writer/printer/printer.cc
+++ b/src/tint/lang/spirv/writer/printer/printer.cc
@@ -204,20 +204,6 @@
return std::move(writer.Result());
}
- /// @returns the generated SPIR-V module on success, or failure
- Result<writer::Module> Module() {
- if (auto res = Generate(); res != Success) {
- return res.Failure();
- }
-
- // Serialize the module into binary SPIR-V.
- BinaryWriter writer;
- writer.WriteHeader(module_.IdBound(), kWriterVersion);
- writer.WriteModule(module_);
- module_.Code() = std::move(writer.Result());
- return module_;
- }
-
private:
core::ir::Module& ir_;
core::ir::Builder b_;
@@ -2469,8 +2455,4 @@
return Printer{module, options}.Code();
}
-tint::Result<Module> PrintModule(core::ir::Module& module, const Options& options) {
- return Printer{module, options}.Module();
-}
-
} // namespace tint::spirv::writer
diff --git a/src/tint/lang/spirv/writer/printer/printer.h b/src/tint/lang/spirv/writer/printer/printer.h
index 79abc31..d85b0da 100644
--- a/src/tint/lang/spirv/writer/printer/printer.h
+++ b/src/tint/lang/spirv/writer/printer/printer.h
@@ -47,11 +47,6 @@
/// @param options the printer options
tint::Result<std::vector<uint32_t>> Print(core::ir::Module& module, const Options& options);
-/// @returns the generated SPIR-V module on success, or failure
-/// @param module the Tint IR module to generate
-/// @param options the printer options
-tint::Result<Module> PrintModule(core::ir::Module& module, const Options& options);
-
} // namespace tint::spirv::writer
#endif // SRC_TINT_LANG_SPIRV_WRITER_PRINTER_PRINTER_H_