mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
Remove deprecated APIs
Remove the Parser classes from the wgsl and spirv namespaces. These have been replaced with a Parse() method. Remove the TypeDeterminer::Run() method, this was not called by tint and the TypeDeterminer is now non-public API. Change-Id: I5ddb82768da04398ab3958d1647be44f9fe30c21 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/41840 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
6b4924fb0e
commit
7206e25798
@@ -35,7 +35,8 @@ CommonFuzzer::CommonFuzzer(InputFormat input, OutputFormat output)
|
||||
CommonFuzzer::~CommonFuzzer() = default;
|
||||
|
||||
int CommonFuzzer::Run(const uint8_t* data, size_t size) {
|
||||
std::unique_ptr<reader::Reader> parser;
|
||||
Program program;
|
||||
|
||||
#if TINT_BUILD_WGSL_READER
|
||||
std::unique_ptr<Source::File> file;
|
||||
#endif // TINT_BUILD_WGSL_READER
|
||||
@@ -47,7 +48,7 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) {
|
||||
std::string str(reinterpret_cast<const char*>(data), size);
|
||||
|
||||
file = std::make_unique<Source::File>("test.wgsl", str);
|
||||
parser = std::make_unique<reader::wgsl::Parser>(file.get());
|
||||
program = reader::wgsl::Parse(file.get());
|
||||
}
|
||||
#endif // TINT_BUILD_WGSL_READER
|
||||
break;
|
||||
@@ -59,7 +60,7 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) {
|
||||
std::vector<uint32_t> input(u32Data, u32Data + sizeInU32);
|
||||
|
||||
if (input.size() != 0) {
|
||||
parser = std::make_unique<reader::spirv::Parser>(input);
|
||||
program = reader::spirv::Parse(input);
|
||||
}
|
||||
}
|
||||
#endif // TINT_BUILD_WGSL_READER
|
||||
@@ -68,19 +69,10 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!parser) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!parser->Parse()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (output_ == OutputFormat::kNone) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto program = parser->program();
|
||||
if (!program.IsValid()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user