From 34f9e296418229074e1cf2ecdf5049cb6acfcebe Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 25 Feb 2011 21:20:15 +0000 Subject: [PATCH] Driver: Attmpt to fix some possibly UB that MSVC doesn't care for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126513 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index d8c374437b..1c396bd0ed 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -42,7 +42,7 @@ Darwin::Darwin(const HostInfo &Host, const llvm::Triple& Triple) // Compute the initial Darwin version based on the host. bool HadExtra; std::string OSName = Triple.getOSName(); - if (!Driver::GetReleaseVersion(&OSName[6], + if (!Driver::GetReleaseVersion(&OSName.c_str()[6], DarwinVersion[0], DarwinVersion[1], DarwinVersion[2], HadExtra)) getDriver().Diag(clang::diag::err_drv_invalid_darwin_version) << OSName; -- 2.40.0