summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2020-06-18 13:40:08 -0700
committerGitHub <noreply@github.com>2020-06-18 13:40:08 -0700
commit82ba914db9c3823ad7a0834d46b7fccedfe0acee (patch)
treea2361c042e6a03ff957bd4a921f73efbb89dc1b7 /source/core
parent8c6e02bd094bbc0c9afb141265be9675f99ddb61 (diff)
parent5952e3b3d7f505a7e6d71ecd0793911224f5bac3 (diff)
Merge branch 'master' into dyndispatch
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-test-tool-util.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/source/core/slang-test-tool-util.cpp b/source/core/slang-test-tool-util.cpp
index 3b89321a1..f8e163758 100644
--- a/source/core/slang-test-tool-util.cpp
+++ b/source/core/slang-test-tool-util.cpp
@@ -59,19 +59,9 @@ static SlangResult _addCPPPrelude(const String& parentPath, slang::IGlobalSessio
{
String includePath;
SLANG_RETURN_ON_FAIL(_calcIncludePath(parentPath, "../../../prelude/slang-cpp-prelude.h", includePath));
-
StringBuilder prelude;
prelude << "#include \"" << includePath << "\"\n\n";
- const SlangPassThrough downstreamCompilers[] = {
- SLANG_PASS_THROUGH_CLANG, ///< Clang C/C++ compiler
- SLANG_PASS_THROUGH_VISUAL_STUDIO, ///< Visual studio C/C++ compiler
- SLANG_PASS_THROUGH_GCC, ///< GCC C/C++ compiler
- SLANG_PASS_THROUGH_GENERIC_C_CPP,
- };
- for (auto downstreamCompiler : downstreamCompilers)
- {
- session->setDownstreamCompilerPrelude(downstreamCompiler, prelude.getBuffer());
- }
+ session->setLanguagePrelude(SLANG_SOURCE_LANGUAGE_CPP, prelude.getBuffer());
return SLANG_OK;
}
@@ -79,16 +69,9 @@ static SlangResult _addCUDAPrelude(const String& parentPath, slang::IGlobalSessi
{
String includePath;
SLANG_RETURN_ON_FAIL(_calcIncludePath(parentPath, "../../../prelude/slang-cuda-prelude.h", includePath));
-
StringBuilder prelude;
prelude << "#include \"" << includePath << "\"\n\n";
- const SlangPassThrough downstreamCompilers[] = {
- SLANG_PASS_THROUGH_NVRTC, ///< nvrtc CUDA compiler
- };
- for (auto downstreamCompiler : downstreamCompilers)
- {
- session->setDownstreamCompilerPrelude(downstreamCompiler, prelude.getBuffer());
- }
+ session->setLanguagePrelude(SLANG_SOURCE_LANGUAGE_CUDA, prelude.getBuffer());
return SLANG_OK;
}