[PATCH] D33258: clang-cl: Fix path-based MSVC version detection
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 16 14:46:49 PDT 2017
rnk added a comment.
I'd rather not hardcode all the msvc archs. IMO we should just look up one level and check if that's called bin, and continue if so. I think I had:
bool IsBin = llvm::sys::path::filename(PathEntry).compare_lower("bin");
if (!IsBin) {
PathEntry = llvm::sys::path::parent_path(PathEntry);
IsBin = llvm::sys::path::filename(TestPath).compare_lower("bin");
}
if (IsBin) {
...
The compare_lower is also a fix, because my path looks like ".../VC/Bin".
https://reviews.llvm.org/D33258
More information about the cfe-commits
mailing list