[llvm] r198955 - Remove remove_all. A compiler has no need for recursively deleting a directory.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jan 10 13:04:40 PST 2014


> Do we have a temporary directory RAII class or something? What is the
> recommended way to handle the case where you have multiple temporary files
> but for hygiene it is preferred to keep them together inside a temporary
> directory? (isn't this what Clang does with its temporaries?)

I considered creating a simple RAII class that takes a directory name
and vends a getFile and getSubDir, but there were so few uses that I
just used sys::remove.

If we do add such utility, it should live somewhere in unittests. We
should not put stuff in Support for use just by unit tests.

The closest thing I know in clang is the trimming of the module cache,
but it is specific enough that I don't see a lot of opportunity for
code sharing. Were you thinking of something else?

Cheers,
Rafael



More information about the llvm-commits mailing list