Build fixes

fuzzer: GetErrors() was replaced with Diagnostics()
remote-compile: Add missing header for macOS
Change-Id: I7697fd41b3cc4e3b59e10a6c395d610a51ec8daf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59025
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2021-07-21 09:40:41 +00:00 committed by Tint LUCI CQ
parent 36b49e8834
commit f3fffdaded
2 changed files with 5 additions and 3 deletions

View File

@ -182,8 +182,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
spv_to_wgsl.EnableInspector(); spv_to_wgsl.EnableInspector();
spv_to_wgsl.Run(data, size); spv_to_wgsl.Run(data, size);
if (spv_to_wgsl.HasErrors()) { if (spv_to_wgsl.HasErrors()) {
util::LogSpvError(spv_to_wgsl.GetErrors(), data, size, auto error = spv_to_wgsl.Diagnostics().str();
context->params.error_dir); util::LogSpvError(error, data, size, context->params.error_dir);
return 0; return 0;
} }
@ -204,7 +204,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
fuzzer.EnableInspector(); fuzzer.EnableInspector();
fuzzer.Run(reinterpret_cast<const uint8_t*>(wgsl.data()), wgsl.size()); fuzzer.Run(reinterpret_cast<const uint8_t*>(wgsl.data()), wgsl.size());
if (fuzzer.HasErrors()) { if (fuzzer.HasErrors()) {
util::LogWgslError(fuzzer.GetErrors(), data, size, wgsl, target.second, auto error = spv_to_wgsl.Diagnostics().str();
util::LogWgslError(error, data, size, wgsl, target.second,
context->params.error_dir); context->params.error_dir);
} }
} }

View File

@ -13,6 +13,7 @@
// limitations under the License. // limitations under the License.
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <string> #include <string>