[llvm] 9428084 - Revert "[WindowsDriver] Improve VSInstallPath check for IDE subdirectory"

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 12:38:48 PST 2022


Author: Dimitry Andric
Date: 2022-12-15T21:36:32+01:00
New Revision: 9428084a20a8334414dc8573b54d2c9a8748ce4b

URL: https://github.com/llvm/llvm-project/commit/9428084a20a8334414dc8573b54d2c9a8748ce4b
DIFF: https://github.com/llvm/llvm-project/commit/9428084a20a8334414dc8573b54d2c9a8748ce4b.diff

LOG: Revert "[WindowsDriver]  Improve VSInstallPath check for IDE subdirectory"

This reverts commit cc40dacbd0b736522d0254fb5525cde22bd5f166.

Added: 
    

Modified: 
    llvm/lib/WindowsDriver/MSVCPaths.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/WindowsDriver/MSVCPaths.cpp b/llvm/lib/WindowsDriver/MSVCPaths.cpp
index d7703e9945e9f..fb8991985a9df 100644
--- a/llvm/lib/WindowsDriver/MSVCPaths.cpp
+++ b/llvm/lib/WindowsDriver/MSVCPaths.cpp
@@ -705,10 +705,8 @@ bool findVCToolChainViaRegistry(std::string &Path, ToolsetLayout &VSLayout) {
       getSystemRegistryString(R"(SOFTWARE\Microsoft\VCExpress\$VERSION)",
                               "InstallDir", VSInstallPath, nullptr)) {
     if (!VSInstallPath.empty()) {
-      auto pos = VSInstallPath.find(R"(\Common7\IDE)");
-      if(pos == std::string::npos)
-        return false;
-      SmallString<256> VCPath(StringRef(VSInstallPath.c_str(), pos));
+      SmallString<256> VCPath(StringRef(VSInstallPath.c_str(),
+                                        VSInstallPath.find(R"(\Common7\IDE)")));
       sys::path::append(VCPath, "VC");
 
       Path = std::string(VCPath.str());


        


More information about the llvm-commits mailing list