[llvm] [LLVM] Fix VisualStudio detection (PR #212498)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 07:57:37 PDT 2026
================
@@ -675,6 +675,12 @@ bool llvm::findVCToolChainViaSetupConfig(
ISetupInstancePtr NewestInstance;
std::optional<uint64_t> NewestVersionNum;
do {
+ bstr_t NameString;
+ HR = Instance->GetInstallationName(NameString.GetAddress());
+ if (FAILED(HR))
+ continue;
+ if (std::wstring_view(NameString).find(L"VisualStudio") != 0)
----------------
enginelesscc wrote:
I do not have the time at the moment to look into the `ISetupInstance2::GetPackages()` idea.
For now though, only accepting 'VisualStudio*' is enough to fix the issue in the minimal way
https://github.com/llvm/llvm-project/pull/212498
More information about the llvm-commits
mailing list