Driver: Attmpt to fix some possibly UB that MSVC doesn't care for.

llvm-svn: 126513
This commit is contained in:
Daniel Dunbar 2011-02-25 21:20:15 +00:00
parent c136bc69ce
commit 5480578d83
1 changed files with 1 additions and 1 deletions

View File

@ -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;