clang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparator, that is ';' in Win32 hosts.

Thanks to Bogon Kim!

llvm-svn: 169964
This commit is contained in:
NAKAMURA Takumi 2012-12-12 06:22:22 +00:00
parent 07cc84876e
commit ad80c5ef76
1 changed files with 2 additions and 1 deletions

View File

@ -238,7 +238,8 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
if (char *env = ::getenv("COMPILER_PATH")) {
StringRef CompilerPath = env;
while (!CompilerPath.empty()) {
std::pair<StringRef, StringRef> Split = CompilerPath.split(':');
std::pair<StringRef, StringRef> Split
= CompilerPath.split(llvm::sys::PathSeparator);
PrefixDirs.push_back(Split.first);
CompilerPath = Split.second;
}