[JITLink][ORC] Add LinkGraph::allocateCString method.
Renames the existing allocateString method to allocateContent and adds a pair of allocateCString methods. The previous allocateString method did not include a null-terminator. It behaved the same as allocateContent except with a Twine input, rather than an ArrayRef<char>. Renaming allocateString to allocateBuffer (overloading the existing method) makes this clearer. The new allocateCString methods allocate the given content plus a null-terminator character, and return a buffer covering both the string and null-terminator. This makes them suitable for creating c-string content for jitlink::Blocks. Existing users of the old allocateString method have been updated to use the new allocateContent overload.
Loading
Please sign in to comment