mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
Rename Constant::As to Constant::ValueAs.
This CL updates Constant::As to be Constant::ValueAs. Now that Constant inherits from CastableBase, there is already an As method on CastableBase. This makes the override inside Constant confusing and potentially incorrect. Bug: tint:1718 Change-Id: I4f73971801e95225a99a5a993124c04194d0d7d6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114360 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
35842190ef
commit
5addefb148
@@ -559,7 +559,7 @@ struct DirectVariableAccess::State {
|
||||
const ast::Expression* BuildDynamicIndex(const sem::Expression* idx, bool cast_to_u32) {
|
||||
if (auto* val = idx->ConstantValue()) {
|
||||
// Expression evaluated to a constant value. Just emit that constant.
|
||||
return b.Expr(val->As<AInt>());
|
||||
return b.Expr(val->ValueAs<AInt>());
|
||||
}
|
||||
|
||||
// Expression is not a constant, clone the expression.
|
||||
|
||||
Reference in New Issue
Block a user