[PATCH] D140019: [WindowsDriver] Improve VSInstallPath check for IDE subdirectory
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 12:32:21 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcc40dacbd0b7: [WindowsDriver] Improve VSInstallPath check for IDE subdirectory (authored by dim).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140019/new/
https://reviews.llvm.org/D140019
Files:
llvm/lib/WindowsDriver/MSVCPaths.cpp
Index: llvm/lib/WindowsDriver/MSVCPaths.cpp
===================================================================
--- llvm/lib/WindowsDriver/MSVCPaths.cpp
+++ llvm/lib/WindowsDriver/MSVCPaths.cpp
@@ -705,8 +705,10 @@
getSystemRegistryString(R"(SOFTWARE\Microsoft\VCExpress\$VERSION)",
"InstallDir", VSInstallPath, nullptr)) {
if (!VSInstallPath.empty()) {
- SmallString<256> VCPath(StringRef(VSInstallPath.c_str(),
- VSInstallPath.find(R"(\Common7\IDE)")));
+ auto pos = VSInstallPath.find(R"(\Common7\IDE)");
+ if(pos == std::string::npos)
+ return false;
+ SmallString<256> VCPath(StringRef(VSInstallPath.c_str(), pos));
sys::path::append(VCPath, "VC");
Path = std::string(VCPath.str());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140019.483300.patch
Type: text/x-patch
Size: 813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221215/16c898da/attachment.bin>
More information about the llvm-commits
mailing list