aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;