Skip to content
Commit f258bf90 authored by Greg Clayton's avatar Greg Clayton
Browse files

llvm::sys::path::home_directory() relies on having "HOME" set in the...

llvm::sys::path::home_directory() relies on having "HOME" set in the environment and that might not always be set. Our FileSpec class uses this function to resolve any paths that start with "~/" on systems that support home directories as '~'. I have modified FileSpec::ResolveUsername (llvm::SmallVectorImpl<char> &path) to deal with the cases where llvm::sys::path::home_directory() returns false by digging a little further on unix systems and setting "HOME" in the environment so that subsequent calls to llvm::sys::path::home_directory() will succeed.

I also added a test to ensure we don't regress.

<rdar://problem/25342377> 

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