mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 17:35:30 +00:00
tint/sem: Add const to StructMember 'type'.
This should be immutable once the sem tree is built. Add a hacky const_cast in Resolver for now, as this is preferable to having some things non-const in sem. Bug: tint:745 Change-Id: I67ebce76730347c9543875ab8e1c21a47d71fd56 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97584 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
8e0368e554
commit
6fb5d379c2
@@ -157,7 +157,7 @@ bool Struct::IsConstructible() const {
|
||||
|
||||
StructMember::StructMember(const ast::StructMember* declaration,
|
||||
Symbol name,
|
||||
sem::Type* type,
|
||||
const sem::Type* type,
|
||||
uint32_t index,
|
||||
uint32_t offset,
|
||||
uint32_t align,
|
||||
|
||||
@@ -182,7 +182,7 @@ class StructMember final : public Castable<StructMember, Node> {
|
||||
/// @param size the byte size of the member
|
||||
StructMember(const ast::StructMember* declaration,
|
||||
Symbol name,
|
||||
sem::Type* type,
|
||||
const sem::Type* type,
|
||||
uint32_t index,
|
||||
uint32_t offset,
|
||||
uint32_t align,
|
||||
@@ -205,7 +205,7 @@ class StructMember final : public Castable<StructMember, Node> {
|
||||
const sem::Struct* Struct() const { return struct_; }
|
||||
|
||||
/// @returns the type of the member
|
||||
sem::Type* Type() const { return type_; }
|
||||
const sem::Type* Type() const { return type_; }
|
||||
|
||||
/// @returns the member index
|
||||
uint32_t Index() const { return index_; }
|
||||
@@ -223,7 +223,7 @@ class StructMember final : public Castable<StructMember, Node> {
|
||||
const ast::StructMember* const declaration_;
|
||||
const Symbol name_;
|
||||
const sem::Struct* struct_;
|
||||
sem::Type* const type_;
|
||||
const sem::Type* type_;
|
||||
const uint32_t index_;
|
||||
const uint32_t offset_;
|
||||
const uint32_t align_;
|
||||
|
||||
Reference in New Issue
Block a user