From 5c2c2cfc9918bb43225159e67a851e196e17759a Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 26 Aug 2022 20:32:53 -0400 Subject: DownstreamCompileOptions using POD types (#2381) * #include an absolute path didn't work - because paths were taken to always be relative. * Make DownstreamCompileOptions use POD types. * CharSliceAllocator -> SliceAllocator Added SliceConverter CharSliceCaster -> SliceCaster * First attempt at zero terminating around blobs. * Fix clang warning. * Add SlangTerminatedChars Make Blob implementations support it. Make most blobs 'terminated'. * Fix bug setting up sourceFiles for CommandLineDownstreamCompiler. * Traffic in TerminatedCharSlice for sourceFiles. Use ArtifactDesc to generate temporary file names for source. * Fix typo in testing for shared library/C++. --- source/core/slang-io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/core/slang-io.cpp') diff --git a/source/core/slang-io.cpp b/source/core/slang-io.cpp index a6e97057b..ef260f088 100644 --- a/source/core/slang-io.cpp +++ b/source/core/slang-io.cpp @@ -894,7 +894,7 @@ namespace Slang const size_t sizeInBytes = size_t(positionSizeInBytes); - void* data = out.allocate(sizeInBytes); + void* data = out.allocateTerminated(sizeInBytes); if (!data) { return SLANG_E_OUT_OF_MEMORY; -- cgit v1.2.3