summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
authorskallweitNV <64953474+skallweitNV@users.noreply.github.com>2024-06-27 17:35:17 +0200
committerGitHub <noreply@github.com>2024-06-27 17:35:17 +0200
commitcb610113605f62e784b63012b31b751acb6fac72 (patch)
tree9fce38e85f8de960461c535dd47a7a458b2b3713 /source/slang/slang-compiler.cpp
parent1d4db4224bd981b54b1e5f260a232a1183bbdcda (diff)
Add API for querying dependency files on IModule (#4493)
* Add API for querying dependency files on IModule * return nullptr
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rw-r--r--source/slang/slang-compiler.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index cee104dc9..e61c0f220 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -2471,6 +2471,18 @@ namespace Slang
return nullptr;
}
+ SLANG_NO_THROW SlangInt32 SLANG_MCALL Module::getDependencyFileCount()
+ {
+ return (SlangInt32)getFileDependencies().getCount();
+ }
+
+ SLANG_NO_THROW char const* SLANG_MCALL Module::getDependencyFilePath(
+ SlangInt32 index)
+ {
+ SourceFile* sourceFile = getFileDependencies()[index];
+ return sourceFile->getPathInfo().hasFoundPath() ? sourceFile->getPathInfo().foundPath.getBuffer() : nullptr;
+ }
+
void validateEntryPoint(
EntryPoint* entryPoint,
DiagnosticSink* sink);