From 8a61b9dd0ca729df894dad4c89c6ce3bf39ef0be Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 17 Mar 2023 11:05:15 -0400 Subject: Support for producing SourceMap on emit (#2707) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP source map. * Split out handling of RttiTypeFuncs to a map type. * Make RttiTypeFuncsMap hold default impls. * Slightly more sophisticated RttiTypeFuncsMap * Source map decoding. * Fix tabs. * Fix asserts due to negative values. * Use less obscure mechanisms in SourceMap. * Source map decoding. Simplifying SourceMap usage. * First attempt at ouputting a source map as part of emit. * Added support for -source-map option. SourceMap is added to the artifact. --- source/slang/slang-emit-cpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-emit-cpp.cpp') diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 795ec74b0..2a2ae06c6 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -338,7 +338,7 @@ SlangResult CPPSourceEmitter::calcTypeName(IRType* type, CodeGenTarget target, S // TODO(JS): This is a bit of a hack. We don't want to emit the result here, // so we replace the writer, write out the type, grab the contents, and restore the writer - SourceWriter writer(sourceManager, LineDirectiveMode::None); + SourceWriter writer(sourceManager, LineDirectiveMode::None, nullptr); m_writer = &writer; m_writer->emit(prefix); -- cgit v1.2.3