<div dir="ltr">Hi,<div><br></div><div>llvm::sys::path allows the user to query "known directory" paths: temp, cache, home. I was tweaking this area a bit for some time. I would like to propose a small redesign.</div><div><br></div><div>What we have so far?</div><div><br></div><div>home_directory() tries to return what it promises. No issues with that.</div><div><br></div><div>system_temp_directory(true) returns a path to a directory that can be erased on reboot. On Linux it is usually /tmp. On Windows and OSX it returns user's temp directories as a first choice.</div><div><br></div><div>system_temp_directory(false) returns a path to a directory that is not cleared on reboot. On Linux it is usually /var/tmp. On Windows is the same as system_temp_directory(true). On OSX it is user's cache directory.</div><div><br></div><div>user_cache_directory() returns a path to user's cache directory.</div><div><br></div><div>Redesign proposal:</div><div><ol><li>Add function temp_directory() - a replacement for system_temp_directory(true). If it returns system or user temp directory is OS-specific. Same as system_temp_directory() it always succeed.</li><li>Implement system_temp_directory(bool) in terms of temp_directory() and user_cache_directory().</li><li>Deprecate system_temp_directory(bool).</li></ol><div>Comments?</div></div><div>- PaweÅ‚</div></div>