akuharev added you to the CC list for the revision "Windows ToolChain: remove
excessive backslash if we find WindowsSDK".
Hi chandlerc,
Previously we had:
clang -cc1 ... double backslash in windowsSDK include
Excessive backslash is returned by function getWindowsSDKDir.
The Windows registry contains Microsoft InstallDir with trailing backslash.
http://reviews.llvm.org/D3440
Files:
lib/Driver/WindowsToolChain.cpp
Index: lib/Driver/WindowsToolChain.cpp
===================================================================
--- lib/Driver/WindowsToolChain.cpp
+++ lib/Driver/WindowsToolChain.cpp
@@ -196,6 +196,9 @@
sizeof(windowsSDKInstallDir) - 1);
// If we have both vc80 and vc90, pick version we were compiled with.
if (hasSDKDir && windowsSDKInstallDir[0]) {
+ char *p = windowsSDKInstallDir + strlen(windowsSDKInstallDir) - 1;
+ if (*p == '\\')
+ *p = '\0';
path = windowsSDKInstallDir;
return true;
}
Index: lib/Driver/WindowsToolChain.cpp
===================================================================
--- lib/Driver/WindowsToolChain.cpp
+++ lib/Driver/WindowsToolChain.cpp
@@ -196,6 +196,9 @@
sizeof(windowsSDKInstallDir) - 1);
// If we have both vc80 and vc90, pick version we were compiled with.
if (hasSDKDir && windowsSDKInstallDir[0]) {
+ char *p = windowsSDKInstallDir + strlen(windowsSDKInstallDir) - 1;
+ if (*p == '\\')
+ *p = '\0';
path = windowsSDKInstallDir;
return true;
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits