summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-conformance.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-07-19 13:50:49 -0700
committerGitHub <noreply@github.com>2023-07-19 13:50:49 -0700
commit1cfb1c85b52e00cde2d21874a88cda2c22d18b62 (patch)
treea38b24534d865ffe33a3d0fc030f5449ba729e28 /source/slang/slang-check-conformance.cpp
parent1fe5e83f3dcc8ef0efa2dd083ebdfab5d0f101a9 (diff)
Optimize specialization, and remove unnecessary calls to `simplifyIR`. (#2999)
* Remove unneccessary calls to `simplifyIR`. * fix. * Delete obsolete hoistConst pass. * Fix. * Small improvements. * Fix. * Fix enum lowering. * fix * tweaks. * tweaks. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-conformance.cpp')
-rw-r--r--source/slang/slang-check-conformance.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-check-conformance.cpp b/source/slang/slang-check-conformance.cpp
index 2696f798d..1d19e01bf 100644
--- a/source/slang/slang-check-conformance.cpp
+++ b/source/slang/slang-check-conformance.cpp
@@ -104,6 +104,16 @@ namespace Slang
// For now we are continuing to conflate all the subtype-ish relationships but not
// tangling convertibility into it.
+ // First, make sure both sub type and super type decl are ready for lookup.
+ if (auto subDeclRefType = as<DeclRefType>(subType))
+ {
+ ensureDecl(subDeclRefType->declRef.getDecl(), DeclCheckState::ReadyForLookup);
+ }
+ if (auto superDeclRefType = as<DeclRefType>(subType))
+ {
+ ensureDecl(superDeclRefType->declRef.getDecl(), DeclCheckState::ReadyForLookup);
+ }
+
// In the common case, we can use the pre-computed inheritance information for `subType`
// to enumerate all the types it transitively inherits from.
//