diff options
Diffstat (limited to 'source/slang/slang-ast-base.cpp')
| -rw-r--r-- | source/slang/slang-ast-base.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/slang/slang-ast-base.cpp b/source/slang/slang-ast-base.cpp index a1624fcba..ac18da404 100644 --- a/source/slang/slang-ast-base.cpp +++ b/source/slang/slang-ast-base.cpp @@ -23,15 +23,7 @@ void NodeBase::_initDebug(ASTNodeType inAstNodeType, ASTBuilder* inAstBuilder) } DeclRefBase* Decl::getDefaultDeclRef() { - if (auto astBuilder = getCurrentASTBuilder()) - { - const Index currentEpoch = astBuilder->getEpoch(); - if (currentEpoch != m_defaultDeclRefEpoch || !m_defaultDeclRef) - { - m_defaultDeclRef = astBuilder->getOrCreate<DirectDeclRef>(this); - m_defaultDeclRefEpoch = currentEpoch; - } - } + SLANG_ASSERT(m_defaultDeclRef); return m_defaultDeclRef; } |
