mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
ICE macros: Use '<<' for error message
Lessens the friction of using these macros. Also allows you to add a message to TINT_UNREACHABLE(), which you couldn't do before. Change-Id: Ida4d63ec96e1d99af71503e8b80d7a5a712e6a47 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/42020 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
41085503e1
commit
3a9a55eec6
@@ -45,7 +45,7 @@ Module::Module(const Source& source, std::vector<CastableBase*> global_decls)
|
||||
global_variables_.push_back(var);
|
||||
} else {
|
||||
diag::List diagnostics;
|
||||
TINT_ICE(diagnostics, "Unknown global declaration type");
|
||||
TINT_ICE(diagnostics) << "Unknown global declaration type";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ void Module::Copy(CloneContext* ctx, const Module* src) {
|
||||
} else if (auto* var = decl->As<Variable>()) {
|
||||
AddGlobalVariable(ctx->Clone(var));
|
||||
} else {
|
||||
TINT_ICE(ctx->dst->Diagnostics(), "Unknown global declaration type");
|
||||
TINT_ICE(ctx->dst->Diagnostics()) << "Unknown global declaration type";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user