diff options
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 0bba68aa6..c6946a93d 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -587,8 +587,18 @@ void FrontEndCompileRequest::parseTranslationUnit( TranslationUnitRequest* translationUnit) { IncludeHandlerImpl includeHandler; - includeHandler.linkage = getLinkage(); - includeHandler.searchDirectories = &searchDirectories; + + auto linkage = getLinkage(); + + // TODO(JS): NOTE! Here we are using the searchDirectories on the linkage. This is because + // currently the API only allows the setting search paths on linkage. + // + // Here we should probably be using the searchDirectories on the FrontEndCompileRequest. + // If searchDirectories.parent pointed to the one in the Linkage would mean linkage paths + // would be checked too (after those on the FrontEndCompileRequest). + + includeHandler.linkage = linkage; + includeHandler.searchDirectories = &linkage->searchDirectories; RefPtr<Scope> languageScope; switch (translationUnit->sourceLanguage) |
