From 467fa3a5dcdd36e310b084747d6f4fcd6ca81249 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 20 Apr 2023 11:55:26 -0400 Subject: Improvements outputting containers (#2815) * #include an absolute path didn't work - because paths were taken to always be relative. * Moved JSON source map writing logic to JSONSourceMapUtil. * Use ArtifactHandler to read/write SourceMaps. Use ObjectCastableAdapter to hold SourceMap Only serialize SourceMap <-> JSON on demand. * Make some types swappable. * BoxValue impl. * Added asBoxValue. * Remove const get funcs. * Fix typo in asBoxValue. * Fix another typo in asBoxValue. * Slightly simplify conversion to blob of SourceMap. * WIP Api improvements around sourcemap/artifact/line-directive. * Small fix for asBoxValue * WIP outputting container with multiple artifacts. * Added ArtifactContailerUtil::filter to produce an artifact hierarchy that only contains "signficant" and "blobable" artifacts. * Make emitting IR disjoint to using a container. Added -emit-ir option. Simplfiy output. * Fix typo in options parsing. * Add a test that ouputs with an emit source map. * Enable emitting our SlangIR module if no targets are specified. * Fix issues constructing container. * Extra checks getting obfuscated source map from a translation unit. * Fix typo. --- slang.h | 1 + 1 file changed, 1 insertion(+) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 732402441..1b9302036 100644 --- a/slang.h +++ b/slang.h @@ -721,6 +721,7 @@ extern "C" SLANG_LINE_DIRECTIVE_MODE_NONE, /**< Don't emit line directives at all. */ SLANG_LINE_DIRECTIVE_MODE_STANDARD, /**< Emit standard C-style `#line` directives. */ SLANG_LINE_DIRECTIVE_MODE_GLSL, /**< Emit GLSL-style directives with file *number* instead of name */ + SLANG_LINE_DIRECTIVE_MODE_SOURCE_MAP, /**< Use a source map to track line mappings (ie no #line will appear in emitting source) */ }; typedef int SlangSourceLanguageIntegral; -- cgit v1.2.3