Skip to content

Commit

Permalink
[spirv] Remove PrintModule function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: dan sinclair <[email protected]>
Auto-Submit: James Price <[email protected]>
  • Loading branch information
jrprice authored and Dawn LUCI CQ committed Aug 26, 2024
1 parent 3effc32 commit 8eb3130
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
18 changes: 0 additions & 18 deletions src/tint/lang/spirv/writer/printer/printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,20 +204,6 @@ class Printer {
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_;
Expand Down Expand Up @@ -2469,8 +2455,4 @@ tint::Result<std::vector<uint32_t>> Print(core::ir::Module& module, const Option
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
5 changes: 0 additions & 5 deletions src/tint/lang/spirv/writer/printer/printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ namespace tint::spirv::writer {
/// @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_

0 comments on commit 8eb3130

Please sign in to comment.