summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-11-13 20:32:29 -0800
committerGitHub <noreply@github.com>2024-11-13 20:32:29 -0800
commitfdf106b543c756eebca7e90fe839fdf1902cc381 (patch)
treee62a88b11971b9539918aa955f63416e30ab2a2b
parente0d03dabf2591bb8a0a0686c9d38b0046487964e (diff)
Make `getDependencyFilePath` return most unique identity. (#5553)
-rw-r--r--source/slang/slang-compiler.cpp2
-rw-r--r--source/slang/slang.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index 4126b79eb..c0c2c09c5 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -2722,7 +2722,7 @@ SLANG_NO_THROW char const* SLANG_MCALL Module::getDependencyFilePath(SlangInt32
{
SourceFile* sourceFile = getFileDependencies()[index];
return sourceFile->getPathInfo().hasFoundPath()
- ? sourceFile->getPathInfo().foundPath.getBuffer()
+ ? sourceFile->getPathInfo().getMostUniqueIdentity().getBuffer()
: nullptr;
}
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 25419fb33..854d90df5 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -6890,7 +6890,7 @@ char const* EndToEndCompileRequest::getDependencyFilePath(int index)
auto program = frontEndReq->getGlobalAndEntryPointsComponentType();
SourceFile* sourceFile = program->getFileDependencies()[index];
return sourceFile->getPathInfo().hasFoundPath()
- ? sourceFile->getPathInfo().foundPath.getBuffer()
+ ? sourceFile->getPathInfo().getMostUniqueIdentity().getBuffer()
: "unknown";
}