From 9a6eec6192a373d8c14073f63f68e160d762ee50 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 18 Sep 2020 11:02:06 -0400 Subject: Control container serialization with SerialOptionFlags (#1550) * Test if blob is returned. * Rename serialize files so can be grouped. * StringRepresentationCache -> SerialStringTable * Split out SerialStringTable from slang-serialize-ir * First pass at reorganizing serialization/containers. Remain some issues about debug info. * Fix bug in calculating sourceloc. * Improve calcFixSourceLoc * Make allocations for payload RiffContainer align to at least 8 bytes. This is important for read, if the payload can contain 8 byte aligned data. Note this has no effect on Riff file format alignment rules. * Improve comments around RiffContainer and alignment. * Remove SerialStringTable, can just use StringSlicePool instead. * Add flags to control what is output in SerialContainer. Turn off AST output for obfuscated code. Lazily create astClasses when doing write container serialization. * Typo fix for Clang/Linux. --- source/slang/slang.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index c9dccbdbf..43d1ede7e 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -1076,9 +1076,10 @@ void FrontEndCompileRequest::generateIR() if (verifyDebugSerialization) { SerialContainerUtil::WriteOptions options; + options.compressionType = SerialCompressionType::None; options.sourceManager = getSourceManager(); - options.optionFlags = SerialOptionFlag::DebugInfo; + options.optionFlags |= SerialOptionFlag::DebugInfo; // Verify debug information if (SLANG_FAILED(SerialContainerUtil::verifyIRSerialize(irModule, getSession(), options))) -- cgit v1.2.3