[JITLink] Fix bug in LinkGraph::createMutableContentBlock overload.
authorLang Hames <lhames@gmail.com>
Fri, 31 Mar 2023 04:53:35 +0000 (21:53 -0700)
committerLang Hames <lhames@gmail.com>
Fri, 31 Mar 2023 18:24:06 +0000 (11:24 -0700)
commitc0952762f238e6e9e69443dd93a00802be8379a5
tree2760bef5b6b7af1b7e8dd3dfba39674549279391
parent8153b92d9b83821e4ead0a4a1c9deb2de7d3ced2
[JITLink] Fix bug in LinkGraph::createMutableContentBlock overload.

Creating zero-filled blocks should use allocateBuffer to allocate the block's
content buffer, rather than allocateContent. (allocateContent interpreted what
would have been the size argument as a single-element ArrayRef and allocated a
single byte).
llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp