mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
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:
parent
8efc190690
commit
9418133055
@ -29,6 +29,7 @@ using namespace sys;
|
|||||||
Optional<std::string> Process::FindInEnvPath(const std::string& EnvName,
|
Optional<std::string> Process::FindInEnvPath(const std::string& EnvName,
|
||||||
const std::string& FileName)
|
const std::string& FileName)
|
||||||
{
|
{
|
||||||
|
assert(!path::is_absolute(FileName));
|
||||||
Optional<std::string> FoundPath;
|
Optional<std::string> FoundPath;
|
||||||
Optional<std::string> OptPath = Process::GetEnv(EnvName);
|
Optional<std::string> OptPath = Process::GetEnv(EnvName);
|
||||||
if (!OptPath.hasValue())
|
if (!OptPath.hasValue())
|
||||||
|
Loading…
Reference in New Issue
Block a user