Skip to content
Commit 70c80b33 authored by Lang Hames's avatar Lang Hames
Browse files

[lld][MachO] Replace some std::string with char* buffers to eliminate mem leaks.

The MachO debug support code (committed in r276935) occasionally needs to
allocate string copies, and was doing so by creating std::strings on a
BumpPtrAllocator. The strings were untracked, so the destructors weren't being
run and we were leaking the memory when the allocator was thrown away. Since
it's easier than tracking the strings, this patch switches the copies to char
buffers allocated directly in the bump-ptr allocator.

llvm-svn: 277208
parent a6b68bf0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment