]> granicus.if.org Git - clang/commit
Use StringRef instead of returning a temporary std::string.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 30 Jan 2010 15:01:47 +0000 (15:01 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 30 Jan 2010 15:01:47 +0000 (15:01 +0000)
commitf22d1fd96d6056a2f271b0f7353b31f47547127b
treef168b479f58b55c84124ef0f4b96abc7ceefba40
parente242d5f5fae8b16cb2d54b9dbb60855d4c67e67d
Use StringRef instead of returning a temporary std::string.

This fixes a really nasty bug in Darwin::getDarwinArchName where we were going
StringRef -> temporary std::string -> StringRef (and return the dead StringRef).
The StringRefs from Triple live as long as the Triple itself, that should be
long enough.

Hopefully 2 of 4 MSVC buildbot failures are gone now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94892 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/ToolChain.h
lib/Driver/Tools.cpp