[tint][ir] Fix unused variable warnings
For GCC.
Change-Id: I0c2e65fc29875179602c4032e8cf6511cdff72ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/189781
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/lang/core/ir/transform/binary_polyfill.cc b/src/tint/lang/core/ir/transform/binary_polyfill.cc
index e74a828..d07ffb6 100644
--- a/src/tint/lang/core/ir/transform/binary_polyfill.cc
+++ b/src/tint/lang/core/ir/transform/binary_polyfill.cc
@@ -125,7 +125,7 @@
/// @param match the type to match the component count of
/// @returns a value with the same number of vector components as @p match
ir::Constant* MatchWidth(ir::Constant* element, const core::type::Type* match) {
- if (auto* vec = match->As<core::type::Vector>()) {
+ if (match->Is<core::type::Vector>()) {
return b.Splat(MatchWidth(element->Type(), match), element);
}
return element;
diff --git a/src/tint/lang/core/ir/transform/builtin_polyfill.cc b/src/tint/lang/core/ir/transform/builtin_polyfill.cc
index f62c7c6..6547d36 100644
--- a/src/tint/lang/core/ir/transform/builtin_polyfill.cc
+++ b/src/tint/lang/core/ir/transform/builtin_polyfill.cc
@@ -224,7 +224,7 @@
/// @param match the type to match the component count of
/// @returns a value with the same number of vector components as @p match
ir::Constant* MatchWidth(ir::Constant* element, const core::type::Type* match) {
- if (auto* vec = match->As<core::type::Vector>()) {
+ if (match->Is<core::type::Vector>()) {
return b.Splat(MatchWidth(element->Type(), match), element);
}
return element;
diff --git a/src/tint/lang/core/ir/transform/conversion_polyfill.cc b/src/tint/lang/core/ir/transform/conversion_polyfill.cc
index 36ea764..e59ef30 100644
--- a/src/tint/lang/core/ir/transform/conversion_polyfill.cc
+++ b/src/tint/lang/core/ir/transform/conversion_polyfill.cc
@@ -206,7 +206,7 @@
/// @param match the type to match the component count of
/// @returns a value with the same number of vector components as @p match
ir::Constant* MatchWidth(ir::Constant* element, const core::type::Type* match) {
- if (auto* vec = match->As<core::type::Vector>()) {
+ if (match->Is<core::type::Vector>()) {
return b.Splat(MatchWidth(element->Type(), match), element);
}
return element;