From 941813305546c1ee937e6aaeb96b541aa9097295 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 24 Apr 2015 22:18:46 +0000 Subject: [PATCH] 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 --- lib/Support/Process.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Support/Process.cpp b/lib/Support/Process.cpp index 3571cd3132e..6dcbb47e87d 100644 --- a/lib/Support/Process.cpp +++ b/lib/Support/Process.cpp @@ -29,6 +29,7 @@ using namespace sys; Optional Process::FindInEnvPath(const std::string& EnvName, const std::string& FileName) { + assert(!path::is_absolute(FileName)); Optional FoundPath; Optional OptPath = Process::GetEnv(EnvName); if (!OptPath.hasValue()) -- 2.34.1