summaryrefslogtreecommitdiff
path: root/source/slang/compiler.h
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-07-21 11:37:31 -0700
committerTim Foley <tfoley@nvidia.com>2017-07-21 11:37:31 -0700
commit9718ab32e91ba632b03ad8d0f5e89a597b225a4c (patch)
treedff607d1927c037f44a6a6fbbf2847f3944f5061 /source/slang/compiler.h
parent85f60e07507f347ef4cb613b6d87521ff10e6c81 (diff)
Add an API option to control emission of `#line` directives
- API users can use this to get "clean" output to aid with debugging Slang issues - Also changes the prefix on intermediate files that Slang dumps, to make them easier to ignore with a regexp
Diffstat (limited to 'source/slang/compiler.h')
-rw-r--r--source/slang/compiler.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/compiler.h b/source/slang/compiler.h
index a7d104b5f..09797664f 100644
--- a/source/slang/compiler.h
+++ b/source/slang/compiler.h
@@ -48,6 +48,14 @@ namespace Slang
ReflectionJSON = SLANG_REFLECTION_JSON,
};
+ enum class LineDirectiveMode : SlangLineDirectiveMode
+ {
+ Default = SLANG_LINE_DIRECTIVE_MODE_DEFAULT,
+ None = SLANG_LINE_DIRECTIVE_MODE_NONE,
+ Standard = SLANG_LINE_DIRECTIVE_MODE_STANDARD,
+ GLSL = SLANG_LINE_DIRECTIVE_MODE_GLSL,
+ };
+
enum class ResultFormat
{
None,
@@ -210,6 +218,9 @@ namespace Slang
// Should we dump intermediate results along the way, for debugging?
bool shouldDumpIntermediates = false;
+ // How should `#line` directives be emitted (if at all)?
+ LineDirectiveMode lineDirectiveMode = LineDirectiveMode::Default;
+
// Output stuff
DiagnosticSink mSink;
String mDiagnosticOutput;