From b5a4161a801a573179b1f552e5c53748d2667b03 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 19 Aug 2020 15:51:43 -0400 Subject: Remove IncludeHandler. (#1505) nvAPI -> NVAPI nvAPIPath -> nvapiPath DxcIncludeHandler don't reference count. nv-api-path -> nvapi-path Co-authored-by: Tim Foley --- source/slang/slang-preprocessor.h | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'source/slang/slang-preprocessor.h') 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 defines, Linkage* linkage, Module* parentModule); -- cgit v1.2.3