From 3e74d39f24fdfaa547ce900be177863e2bfe2dea Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 16 Oct 2018 18:49:11 -0400 Subject: Feature/include refactor (#675) * Refactor of path handling. * Added PathInfo * Changed ISlangFileSystem - such that has separate concepts of reading a file, getting a relative path and getting a canonical path * Added support for getting a canonical path for windows/linux * Made maps/testing around canonicalPaths * User output remains around 'foundPath' - which is the same as before * Small improvements around PathInfo * Added a type and make constructors to make clear the different 'path' uses * Fixed bug in findViewRecursively * Checking and reporting for ignored #pragma once. * Removed SLANG_PATH_TYPE_NONE as doesn't serve any useful purpose. * Improve comments in slang.h aroung ISlangFileSystem * Remove the need for in slang-io.cpp * Ran premake5. * Improvements and fixes around PathInfo. * Fix typo on linix GetCanonical * Make the ISlangFileSystem the same as before, and ISlangFileSystem contain the new methods. Internally it always uses the ISlangFileSystemExt, and will wrap a ISlangFileSystem with WrapFileSystem, if it is determined (via queryInterface) that it doesn't implement the full interface. --- source/slang/compiler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/slang/compiler.cpp') diff --git a/source/slang/compiler.cpp b/source/slang/compiler.cpp index 7a5501a23..4b7fcb554 100644 --- a/source/slang/compiler.cpp +++ b/source/slang/compiler.cpp @@ -186,7 +186,10 @@ namespace Slang for(auto sourceFile : translationUnit->sourceFiles) { codeBuilder << "#line 1 \""; - for(auto c : sourceFile->path) + + const String& path = sourceFile->pathInfo.foundPath; + + for(auto c : path) { char buffer[] = { c, 0 }; switch(c) -- cgit v1.2.3