[Support/Unix] system_temp_directory: Use envvar var regardless of ErasedOnReboot

Rafael Espíndola via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 14:10:26 PST 2015

Interesting. Can you describe your use case a bit? Last time we
discussed this I think we agreed that in the end we would want to end
with just

* temp_directory
* cache_directory
* home_directory

That is, for temp and cache it is undefined whether you get something
in home or not and there is no "bool EraseOnReboot" flag. Would that
work for you?


On 16 December 2015 at 22:56, Tim Bodeit <mail at timbodeit.de> wrote:
> In lib/Support/Path.h the documentation for system_temp_directory contains:
> @param erasedOnReboot […] This parameter will be ignored if the user or
> system has set the typical environment variable […]
> In my eyes on Unix the method currently does the exact opposite: It behaves
> the other way around by ignoring the environment variable if the parameter
> is set.
> I included a patch that changes this.
> It does what I personally need, but I’m not 100% sure yet that this is
> generally the desired behavior.
> If it is not, I feel that instead of this patch the documentation in Path.h
> should be fixed or clarified.
> I’m happy to include test coverage for this if needed, but I would first
> like to confirm the desired behavior.

More information about the llvm-commits mailing list