aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-02-25 21:20:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-02-25 21:20:15 +0000
commit34f9e296418229074e1cf2ecdf5049cb6acfcebe (patch)
treed8f6142ada6c056f69b19bf625205d66d9f13416
parent5e24f2a4ad3a3623349f058e99c7c71e1c8d705f (diff)
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
-rw-r--r--lib/Driver/ToolChains.cpp2
1 files changed, 1 insertions, 1 deletions
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;