ast: intrinsic spelling matches the spec

Update the comments around the stream output method for ast::Intrinsic.

Change-Id: I06a3082927c83eb9172357c34a0587aac5f80465
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32360
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
David Neto 2020-11-11 14:30:25 +00:00 committed by Commit Bot service account
parent 3b04058d19
commit f16dfeb015
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,8 @@ namespace tint {
namespace ast { namespace ast {
std::ostream& operator<<(std::ostream& out, Intrinsic i) { std::ostream& operator<<(std::ostream& out, Intrinsic i) {
/// The emitted name matches the spelling in the WGSL spec.
/// including case.
switch (i) { switch (i) {
case Intrinsic::kAbs: case Intrinsic::kAbs:
out << "abs"; out << "abs";

View File

@ -93,6 +93,8 @@ enum class Intrinsic {
kTrunc kTrunc
}; };
/// Emits the name of the intrinsic function. The spelling,
/// including case, matches the name in the WGSL spec.
std::ostream& operator<<(std::ostream& out, Intrinsic i); std::ostream& operator<<(std::ostream& out, Intrinsic i);
namespace intrinsic { namespace intrinsic {