diff options
Diffstat (limited to 'source/slang/slang-check-type.cpp')
| -rw-r--r-- | source/slang/slang-check-type.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-check-type.cpp b/source/slang/slang-check-type.cpp index 34f16751b..d9691a828 100644 --- a/source/slang/slang-check-type.cpp +++ b/source/slang/slang-check-type.cpp @@ -101,6 +101,13 @@ Type* SemanticsVisitor::getRemovedModifierType(ModifiedType* modifiedType, Modif return m_astBuilder->getModifiedType(modifiedType->getBase(), newModifiers); } +Type* SemanticsVisitor::getConstantBufferType(Type* elementType, Type* layoutType) +{ + auto iBufferDataLayoutType = m_astBuilder->getSharedASTBuilder()->getIBufferDataLayoutType(); + auto witness = isSubtype(layoutType, iBufferDataLayoutType, IsSubTypeOptions()); + return m_astBuilder->getConstantBufferType(elementType, layoutType, witness); +} + Expr* SemanticsVisitor::ExpectATypeRepr(Expr* expr) { if (auto overloadedExpr = as<OverloadedExpr>(expr)) |
