aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Process.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-09-22 00:10:07 +0300
committerMartin Storsjö <martin@martin.st>2020-09-22 00:14:45 +0300
commit8c3ef08f8a4eb40609af55d541e5135856fde086 (patch)
treee11831c611eefed204a10a6a6856e6c6e24977b8 /llvm/lib/Support/Process.cpp
parent2c768c7d6c6185e2c9a606027ee673bd2640e5ca (diff)
downloadllvm-8c3ef08f8a4eb40609af55d541e5135856fde086.zip
llvm-8c3ef08f8a4eb40609af55d541e5135856fde086.tar.gz
llvm-8c3ef08f8a4eb40609af55d541e5135856fde086.tar.bz2
Revert "[clang-cl] Always interpret the LIB env var as separated with semicolons"
This reverts commit 4d85444b317a00a3e15da63cdb693d272c99a0cc. This commit broke building lldb's NativeProcessProtocolTest.cpp, with errors like these: In file included from include/llvm/Support/Process.h:32:0, from tools/lldb/unittests/Host/NativeProcessProtocolTest.cpp:12: include/llvm/Support/Program.h:39:11: error: reference to ‘pid_t’ is ambiguous typedef pid_t procid_t; /usr/include/sched.h:38:17: note: candidates are: typedef __pid_t pid_t typedef __pid_t pid_t; tools/lldb/include/lldb/lldb-types.h:85:18: note: typedef uint64_t lldb::pid_t typedef uint64_t pid_t;
Diffstat (limited to 'llvm/lib/Support/Process.cpp')
-rw-r--r--llvm/lib/Support/Process.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Support/Process.cpp b/llvm/lib/Support/Process.cpp
index 9f0b689..9e6e233 100644
--- a/llvm/lib/Support/Process.cpp
+++ b/llvm/lib/Support/Process.cpp
@@ -28,22 +28,21 @@ using namespace sys;
//=== independent code.
//===----------------------------------------------------------------------===//
-Optional<std::string>
-Process::FindInEnvPath(StringRef EnvName, StringRef FileName, char Separator) {
- return FindInEnvPath(EnvName, FileName, {}, Separator);
+Optional<std::string> Process::FindInEnvPath(StringRef EnvName,
+ StringRef FileName) {
+ return FindInEnvPath(EnvName, FileName, {});
}
Optional<std::string> Process::FindInEnvPath(StringRef EnvName,
StringRef FileName,
- ArrayRef<std::string> IgnoreList,
- char Separator) {
+ ArrayRef<std::string> IgnoreList) {
assert(!path::is_absolute(FileName));
Optional<std::string> FoundPath;
Optional<std::string> OptPath = Process::GetEnv(EnvName);
if (!OptPath.hasValue())
return FoundPath;
- const char EnvPathSeparatorStr[] = {Separator, '\0'};
+ const char EnvPathSeparatorStr[] = {EnvPathSeparator, '\0'};
SmallVector<StringRef, 8> Dirs;
SplitString(OptPath.getValue(), Dirs, EnvPathSeparatorStr);