[PATCH]Locate Visual Studio InstallDir in the presence of newer runtime

Yaron Keren yaron.keren at gmail.com
Sat Oct 5 15:27:41 PDT 2013

getSystemRegistryString is used to find the newest Visual Studio
installation. The existing logic is:
1) Find newest Visual Studio
2) For the newest, check if there InstallDir

This logic fails after installing a Visual Studio Runtime which is newer
than the install Visual Studio IDE. In such case, 1) find the newer runtime
which does not have InstallDir since it's not the IDE.

To handle such situations, a combined logic implemented in this patch is:
Find newest Visual Studio for which InstallDir exists.

In addition, I renamed a local variable named value to dvalue since it was
shadowing an outer local variable named value.

This was tested on a machine where VS 2012 IDE + VS 2013 runtime are

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131006/693a1524/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vsdir.diff
Type: application/octet-stream
Size: 2098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131006/693a1524/attachment.obj>

More information about the cfe-commits mailing list