r220434 - Fix C++ compliance issue. string literals must be const char *

Zachary Turner zturner at google.com
Wed Oct 22 14:48:56 PDT 2014


Author: zturner
Date: Wed Oct 22 16:48:56 2014
New Revision: 220434

URL: http://llvm.org/viewvc/llvm-project?rev=220434&view=rev
Log:
Fix C++ compliance issue.  string literals must be const char *

Modified:
    cfe/trunk/lib/Driver/MSVCToolChain.cpp

Modified: cfe/trunk/lib/Driver/MSVCToolChain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/MSVCToolChain.cpp?rev=220434&r1=220433&r2=220434&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/MSVCToolChain.cpp (original)
+++ cfe/trunk/lib/Driver/MSVCToolChain.cpp Wed Oct 22 16:48:56 2014
@@ -242,9 +242,9 @@ bool MSVCToolChain::getWindowsSDKLibrary
     // Windows SDK 8.x installs libraries in a folder whose names depend on the
     // version of the OS you're targeting.  By default choose the newest, which
     // usually corresponds to the version of the OS you've installed the SDK on.
-    char *tests[] = {"winv6.3", "win8", "win7"};
+    const char *tests[] = {"winv6.3", "win8", "win7"};
     bool found = false;
-    for (char *test : tests) {
+    for (const char *test : tests) {
       llvm::SmallString<128> testPath(libPath);
       llvm::sys::path::append(testPath, test);
       if (llvm::sys::fs::exists(testPath.c_str())) {





More information about the cfe-commits mailing list