From 7258ef4ddebd021208a019f6ee73edcda57a88f7 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 20 Aug 2019 09:43:59 -0400 Subject: User defined downstream compiler prelude (#1028) * Added setDownstreamCompilerPrelude Renamed setPassThroughPath to setDownstreamCompilerPath. Fixed tests. Added prelude directory & code to TestToolUtil to setup default preludes for testing/command line apis. * Fix merge problem * Remove hacks to make prelude work by adding a search path as no longer needed with 'user prelude'. * Split up prelude into scalar intrinsics, and types. Use slang.h for main header. slang-cpp-prelude.h can now just include what it needs (relative to prelude directory) and define the few remaining things/work arounds. * Fix typo. --- source/core/slang-test-tool-util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/core/slang-test-tool-util.h') diff --git a/source/core/slang-test-tool-util.h b/source/core/slang-test-tool-util.h index a5d7541ec..9df2a6d6a 100644 --- a/source/core/slang-test-tool-util.h +++ b/source/core/slang-test-tool-util.h @@ -46,6 +46,9 @@ struct TestToolUtil /// Given a slang result, returns a return code that can be returned from an executable static ToolReturnCode getReturnCode(SlangResult res); + + /// Sets the default preludes on the session based on the executable path + static SlangResult setSessionDefaultPrelude(const char* exePath, slang::IGlobalSession* session); }; } // namespace Slang -- cgit v1.2.3