mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
Change generators to take a pointer instead of move.
This CL changes the generators so we don't have to move the module into the generator. This will then allow calling the demangler at a later point and still having access to the module. Change-Id: Icad16ddb2b89921cbb174cf7fec520c410139285 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36942 Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
dan sinclair
parent
7d152e0936
commit
b920e604b2
@@ -550,7 +550,7 @@ int main(int argc, const char** argv) {
|
||||
|
||||
#if TINT_BUILD_SPV_WRITER
|
||||
if (options.format == Format::kSpirv || options.format == Format::kSpvAsm) {
|
||||
writer = std::make_unique<tint::writer::spirv::Generator>(std::move(mod));
|
||||
writer = std::make_unique<tint::writer::spirv::Generator>(&mod);
|
||||
}
|
||||
#endif // TINT_BUILD_SPV_WRITER
|
||||
|
||||
@@ -562,13 +562,13 @@ int main(int argc, const char** argv) {
|
||||
|
||||
#if TINT_BUILD_MSL_WRITER
|
||||
if (options.format == Format::kMsl) {
|
||||
writer = std::make_unique<tint::writer::msl::Generator>(std::move(mod));
|
||||
writer = std::make_unique<tint::writer::msl::Generator>(&mod);
|
||||
}
|
||||
#endif // TINT_BUILD_MSL_WRITER
|
||||
|
||||
#if TINT_BUILD_HLSL_WRITER
|
||||
if (options.format == Format::kHlsl) {
|
||||
writer = std::make_unique<tint::writer::hlsl::Generator>(std::move(mod));
|
||||
writer = std::make_unique<tint::writer::hlsl::Generator>(&mod);
|
||||
}
|
||||
#endif // TINT_BUILD_HLSL_WRITER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user