Assert that Process::FindInEnvPath() is passed a relative path.

It misbehaves with absolute paths. (So does path::append().)
Goes with clang r235787.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235788 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nico Weber 2015-04-24 22:18:46 +00:00
parent 8efc190690
commit 9418133055

View File

@ -29,6 +29,7 @@ using namespace sys;
Optional<std::string> Process::FindInEnvPath(const std::string& EnvName,
const std::string& FileName)
{
assert(!path::is_absolute(FileName));
Optional<std::string> FoundPath;
Optional<std::string> OptPath = Process::GetEnv(EnvName);
if (!OptPath.hasValue())