]> granicus.if.org Git - clang/commit
[Driver] Fix Windows SDK Detection
authorZachary Turner <zturner@google.com>
Thu, 28 Jul 2016 17:13:32 +0000 (17:13 +0000)
committerZachary Turner <zturner@google.com>
Thu, 28 Jul 2016 17:13:32 +0000 (17:13 +0000)
commit394ca50fa91a04fb3df27b9352b10ba23ad5d003
tree88dfd9a6d370bedb7ee0ca3c0ee882a21ed30b01
parent28bd9c65bdec649f2c81b066c8e85027ee77d500
[Driver] Fix Windows SDK Detection

This fixes a couple of bugs in Windows SDK Detection.

1. `readFullStringValue` returns a bool, but was being compared
   with ERROR_SUCCESS.
2. `RegQueryValueExW` might return the null terminator in the
   queried value which will result in incorrect values being
   returned from `getSystemRegistryString`.

Patch By: comicfans44@gmail.com
Reviewed By: zturner
Differential Revision: http://reviews.llvm.org/D21946

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277005 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/MSVCToolChain.cpp