summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ast-support-types.cpp1
-rw-r--r--source/slang/slang-ast-support-types.h2
-rw-r--r--source/slang/slang-check.cpp5
-rw-r--r--source/slang/slang-syntax.h2
4 files changed, 9 insertions, 1 deletions
diff --git a/source/slang/slang-ast-support-types.cpp b/source/slang/slang-ast-support-types.cpp
index b446221ff..a3df25ce9 100644
--- a/source/slang/slang-ast-support-types.cpp
+++ b/source/slang/slang-ast-support-types.cpp
@@ -2,6 +2,7 @@
#include "slang-ast-base.h"
#include "slang-ast-type.h"
#include "slang-ast-expr.h"
+#include "slang-check-impl.h"
namespace Slang
{
diff --git a/source/slang/slang-ast-support-types.h b/source/slang/slang-ast-support-types.h
index d3cb4e55d..67340d52c 100644
--- a/source/slang/slang-ast-support-types.h
+++ b/source/slang/slang-ast-support-types.h
@@ -1421,7 +1421,9 @@ namespace Slang
}
};
+ // A helper to avoid having to include slang-check-impl.h in slang-syntax.h
struct SemanticsVisitor;
+ ASTBuilder* semanticsVisitorGetASTBuilder(SemanticsVisitor*);
struct LookupRequest
{
diff --git a/source/slang/slang-check.cpp b/source/slang/slang-check.cpp
index bcc74a6d0..276e086df 100644
--- a/source/slang/slang-check.cpp
+++ b/source/slang/slang-check.cpp
@@ -210,4 +210,9 @@ namespace Slang
throw;
}
}
+
+ ASTBuilder* semanticsVisitorGetASTBuilder(SemanticsVisitor* sv)
+ {
+ return sv->getASTBuilder();
+ }
}
diff --git a/source/slang/slang-syntax.h b/source/slang/slang-syntax.h
index ec740d218..44bd1743f 100644
--- a/source/slang/slang-syntax.h
+++ b/source/slang/slang-syntax.h
@@ -84,7 +84,7 @@ namespace Slang
SemanticsVisitor* semanticsVisitor;
static void callback(DeclRefBase declRef, void* userData)
{
- (*((*(Helper*)userData).userFunc))(_getSpecializedDeclRef((*(Helper*)userData).semanticsVisitor->getASTBuilder(), declRef.decl, declRef.substitutions).template as<T>());
+ (*((*(Helper*)userData).userFunc))(_getSpecializedDeclRef(semanticsVisitorGetASTBuilder((*(Helper*)userData).semanticsVisitor), declRef.decl, declRef.substitutions).template as<T>());
}
};
Helper helper;