From 565a871ad899c01dc6a1b4bdb1b9d2bc4281758f Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:17:28 -0700 Subject: Fix the issue that 'spGetDependencyFilePath' report 'unknown' (#3927) (#3939) Fix the issue that 'spGetDependencyFilePath' will report "unknown" for the source code is from string. We only reported valid file path when the source code is file a file, so we change that to report a valid file name even when the source code is from the string. --- source/slang/slang.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 355da23b9..9d018d47f 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -6102,7 +6102,7 @@ char const* EndToEndCompileRequest::getDependencyFilePath(int index) auto frontEndReq = getFrontEndReq(); auto program = frontEndReq->getGlobalAndEntryPointsComponentType(); SourceFile* sourceFile = program->getFileDependencies()[index]; - return sourceFile->getPathInfo().hasFileFoundPath() ? sourceFile->getPathInfo().foundPath.getBuffer() : "unknown"; + return sourceFile->getPathInfo().hasFoundPath() ? sourceFile->getPathInfo().foundPath.getBuffer() : "unknown"; } int EndToEndCompileRequest::getTranslationUnitCount() -- cgit v1.2.3