projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f0f165
)
Assert that Process::FindInEnvPath() is passed a relative path.
author
Nico Weber
<nicolasweber@gmx.de>
Fri, 24 Apr 2015 22:18:46 +0000
(22:18 +0000)
committer
Nico Weber
<nicolasweber@gmx.de>
Fri, 24 Apr 2015 22:18:46 +0000
(22:18 +0000)
It misbehaves with absolute paths. (So does path::append().)
Goes with clang r235787.
llvm-svn: 235788
llvm/lib/Support/Process.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/Process.cpp
b/llvm/lib/Support/Process.cpp
index
3571cd3
..
6dcbb47
100644
(file)
--- a/
llvm/lib/Support/Process.cpp
+++ b/
llvm/lib/Support/Process.cpp
@@
-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())