mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
[sem] Move TransitivelyReferencedOverrides to sem::Info.
This CL pulls the TransitivelyReferencedOverrides from sem::Array and sem::GlobalVariable up to the sem::Info. Moving this data outside of sem::Array removes one of the references to non-Type sem content. Bug: tint:1718 Change-Id: I40c1c8b2d5ec60dc2723b56cc30cd436e9b7e997 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112324 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
331a3b7980
commit
527e38b68b
@@ -71,9 +71,12 @@ Transform::ApplyResult SingleEntryPoint::Apply(const Program* src,
|
||||
[&](const ast::TypeDecl* ty) {
|
||||
// Strip aliases that reference unused override declarations.
|
||||
if (auto* arr = sem.Get(ty)->As<sem::Array>()) {
|
||||
for (auto* o : arr->TransitivelyReferencedOverrides()) {
|
||||
if (!referenced_vars.Contains(o)) {
|
||||
return;
|
||||
auto* refs = sem.TransitivelyReferencedOverrides(arr);
|
||||
if (refs) {
|
||||
for (auto* o : *refs) {
|
||||
if (!referenced_vars.Contains(o)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user