[PATCH] D19838: [LLVM-AR] Fixed bug where temporary file would be left behind every time an archive was updated
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 15:25:42 PDT 2016
>> All these objects just wrap a MemoryBufferRef. It is llvm-ar that should be deleting these buffers earlier.
> Ideally, I agree. But the design is such that llvm-ar has no control over when the buffer is done being used. It passes an `Archive` off to `writeArchive` which consumes it and does the file replacement in one step. I thought about splitting that function in two, but that's even uglier.
Maybe pass the buffer ownership to writeArchive?
In any case, we really should not have an Archive that can optionally
own the buffer.
Cheers,
Rafael
More information about the llvm-commits
mailing list