[MSVCToolChain] Guard hardcoded Windows paths with LLVM_ON_WIN32

Paths like C:/foo will never work on UNIX platforms, don't bother
implicitly adding them to the search path.

llvm-svn: 276606
This commit is contained in:
David Majnemer 2016-07-25 04:47:44 +00:00
parent 4927c29577
commit d5f7d19dc8
1 changed files with 2 additions and 0 deletions

View File

@ -648,6 +648,7 @@ void MSVCToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
return;
}
#if defined(LLVM_ON_WIN32)
// As a fallback, select default install paths.
// FIXME: Don't guess drives and paths like this on Windows.
const StringRef Paths[] = {
@ -658,6 +659,7 @@ void MSVCToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
"C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include"
};
addSystemIncludes(DriverArgs, CC1Args, Paths);
#endif
}
void MSVCToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,