[ORC][examples] Fix off-by-one error when handling null terminators.
authorLang Hames <lhames@gmail.com>
Sat, 21 May 2022 00:31:31 +0000 (17:31 -0700)
committerLang Hames <lhames@gmail.com>
Sat, 21 May 2022 02:33:49 +0000 (19:33 -0700)
commit55287840fe3f0d175ca649f0b665ccc0c184eb5d
treeb6e875ede3dea43314e8629d713c727b48b8288c
parent7581f138d54a117a3119a80001f4e0467d7d7b0c
[ORC][examples] Fix off-by-one error when handling null terminators.

LLVMCreateMemoryBufferWithMemoryRange checks for a null terminator after the
given range, so we need to pass the length of the module string (excluding the
null terminator).
llvm/examples/OrcV2Examples/OrcV2CBindingsLazy/OrcV2CBindingsLazy.c