diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-15 00:05:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-15 00:05:51 -0800 |
| commit | 5a623ec227726ad1d988a5d91f55f19b62a98e03 (patch) | |
| tree | 94a3fd2f00ce1a95035f39cd3571c9e97a70d24e /source/slang/slang-check-decl.cpp | |
| parent | 2ced683f10fb82f63a2e2c3d7b5f099c53bb57b0 (diff) | |
Support loading serialized modules. (#3588)
* Support loading serialized modules.
* Fix.
* Fix vs solution files
* Fix glsl module loading.
* C++ fix.
* Fix.
* Try fix c++ error.
* Try fix.
* Fix.
* Fix.
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
| -rw-r--r-- | source/slang/slang-check-decl.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index 2a6ee8abc..f1409efe1 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -820,6 +820,11 @@ namespace Slang return as<NamespaceDeclBase>(parentDecl) != nullptr || as<FileDecl>(parentDecl) != nullptr; } + bool isUnsafeForceInlineFunc(FunctionDeclBase* funcDecl) + { + return funcDecl->hasModifier<UnsafeForceInlineEarlyAttribute>(); + } + /// Is `decl` a global shader parameter declaration? bool isGlobalShaderParameter(VarDeclBase* decl) { @@ -7302,7 +7307,7 @@ namespace Slang { // Create a new sub-scope to wire the module // into our lookup chain. - addSiblingScopeForContainerDecl(scope, fileDecl); + addSiblingScopeForContainerDecl(getASTBuilder(), scope, fileDecl); } void SemanticsVisitor::importModuleIntoScope(Scope* scope, ModuleDecl* moduleDecl) @@ -7325,7 +7330,7 @@ namespace Slang if (moduleScope->containerDecl != moduleDecl && moduleScope->containerDecl->parentDecl != moduleDecl) continue; - addSiblingScopeForContainerDecl(scope, moduleScope->containerDecl); + addSiblingScopeForContainerDecl(getASTBuilder(), scope, moduleScope->containerDecl); } // Also import any modules from nested `import` declarations @@ -7547,7 +7552,7 @@ namespace Slang if (addedScopes.add(s->containerDecl)) { scopesAdded = true; - addSiblingScopeForContainerDecl(scope, s->containerDecl); + addSiblingScopeForContainerDecl(getASTBuilder(), scope, s->containerDecl); } } }; @@ -7608,7 +7613,7 @@ namespace Slang { ensureDecl(ns, DeclCheckState::ScopesWired); } - addSiblingScopeForContainerDecl(decl, otherNamespace); + addSiblingScopeForContainerDecl(getASTBuilder(), decl, otherNamespace); } } // For file decls, we need to continue searching up in the parent module scope. |
