summaryrefslogtreecommitdiff
path: root/slang.h
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 /slang.h
parent8c6e02bd094bbc0c9afb141265be9675f99ddb61 (diff)
parent5952e3b3d7f505a7e6d71ecd0793911224f5bac3 (diff)
Merge branch 'master' into dyndispatch
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/slang.h b/slang.h
index 9720b04cb..fd6655fea 100644
--- a/slang.h
+++ b/slang.h
@@ -2862,7 +2862,9 @@ namespace slang
SlangPassThrough passThrough,
char const* path) = 0;
- /** Set the 'prelude' for generated code for a 'downstream compiler'.
+ /** DEPRECIATED: Use setLanguagePrelude
+
+ Set the 'prelude' for generated code for a 'downstream compiler'.
@param passThrough The downstream compiler for generated code that will have the prelude applied to it.
@param preludeText The text added pre-pended verbatim before the generated source
@@ -2872,7 +2874,9 @@ namespace slang
SlangPassThrough passThrough,
const char* preludeText) = 0;
- /** Get the 'prelude' for generated code for a 'downstream compiler'.
+ /** DEPRECIATED: Use getLanguagePrelude
+
+ Get the 'prelude' for generated code for a 'downstream compiler'.
@param passThrough The downstream compiler for generated code that will have the prelude applied to it.
@param outPrelude On exit holds a blob that holds the string of the prelude.
*/
@@ -2909,6 +2913,25 @@ namespace slang
@return The downstream compiler for that source language */
virtual SlangPassThrough SLANG_MCALL getDefaultDownstreamCompiler(
SlangSourceLanguage sourceLanguage) = 0;
+
+ /* Set the 'prelude' placed before generated code for a specific language type.
+
+ @param sourceLanguage The language the prelude should be inserted on.
+ @param preludeText The text added pre-pended verbatim before the generated source
+
+ Note! That for pass-through usage, prelude is not pre-pended, preludes are for code generation only.
+ */
+ virtual SLANG_NO_THROW void SLANG_MCALL setLanguagePrelude(
+ SlangSourceLanguage sourceLanguage,
+ const char* preludeText) = 0;
+
+ /** Get the 'prelude' associated with a specific source language.
+ @param sourceLanguage The language the prelude should be inserted on.
+ @param outPrelude On exit holds a blob that holds the string of the prelude.
+ */
+ virtual SLANG_NO_THROW void SLANG_MCALL getLanguagePrelude(
+ SlangSourceLanguage sourceLanguage,
+ ISlangBlob** outPrelude) = 0;
};
#define SLANG_UUID_IGlobalSession { 0xc140b5fd, 0xc78, 0x452e, { 0xba, 0x7c, 0x1a, 0x1e, 0x70, 0xc7, 0xf7, 0x1c } };