summaryrefslogtreecommitdiff
path: root/source/slang/slang-preprocessor.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-08-19 15:51:43 -0400
committerGitHub <noreply@github.com>2020-08-19 12:51:43 -0700
commitb5a4161a801a573179b1f552e5c53748d2667b03 (patch)
tree4b63bc7274ac060054ab239da4f75aa7233bbddf /source/slang/slang-preprocessor.h
parent2fffbc5ff0727482c6ab7d66f6d852701adb277b (diff)
Remove IncludeHandler. (#1505)
nvAPI -> NVAPI nvAPIPath -> nvapiPath DxcIncludeHandler don't reference count. nv-api-path -> nvapi-path Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-preprocessor.h')
-rw-r--r--source/slang/slang-preprocessor.h27
1 files changed, 1 insertions, 26 deletions
diff --git a/source/slang/slang-preprocessor.h b/source/slang/slang-preprocessor.h
index 0e7509a27..472a8675d 100644
--- a/source/slang/slang-preprocessor.h
+++ b/source/slang/slang-preprocessor.h
@@ -15,36 +15,11 @@ class Linkage;
class Module;
class ModuleDecl;
-// Callback interface for the preprocessor to use when looking
-// for files in `#include` directives.
-struct IncludeHandler
-{
- virtual SlangResult findFile(const String& pathToInclude, const String& pathIncludedFrom, PathInfo& outPathInfo) = 0;
- virtual String simplifyPath(const String& path) = 0;
-};
-
-// A default implementation that uses IncludeSystem to implement functionality
-struct IncludeHandlerImpl : IncludeHandler
-{
- virtual SlangResult findFile(const String& pathToInclude, const String& pathIncludedFrom, PathInfo& outPathInfo) override
- {
- return m_system.findFile(pathToInclude, pathIncludedFrom, outPathInfo);
- }
- virtual String simplifyPath(const String& path) override { return m_system.simplifyPath(path); }
-
- IncludeHandlerImpl(SearchDirectoryList* searchDirectories, ISlangFileSystemExt* fileSystemExt, SourceManager* sourceManager = nullptr) :
- m_system(searchDirectories, fileSystemExt, sourceManager)
- {
- }
-protected:
- IncludeSystem m_system;
-};
-
// Take a string of source code and preprocess it into a list of tokens.
TokenList preprocessSource(
SourceFile* file,
DiagnosticSink* sink,
- IncludeHandler* includeHandler,
+ IncludeSystem* includeSystem,
Dictionary<String, String> defines,
Linkage* linkage,
Module* parentModule);