diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp index 3b45d1670d2..7e4cdf98eef 100644 --- a/lib/MC/MCContext.cpp +++ b/lib/MC/MCContext.cpp @@ -157,8 +157,7 @@ MCSymbol *MCContext::CreateSymbol(StringRef Name) { MCSymbol *MCContext::GetOrCreateSymbol(const Twine &Name) { SmallString<128> NameSV; - Name.toVector(NameSV); - return GetOrCreateSymbol(NameSV.str()); + return GetOrCreateSymbol(Name.toStringRef(NameSV)); } MCSymbol *MCContext::CreateTempSymbol() { diff --git a/lib/Option/ArgList.cpp b/lib/Option/ArgList.cpp index 15f7e8bf4b8..fecd2371735 100644 --- a/lib/Option/ArgList.cpp +++ b/lib/Option/ArgList.cpp @@ -291,8 +291,7 @@ void ArgList::ClaimAllArgs() const { const char *ArgList::MakeArgString(const Twine &T) const { SmallString<256> Str; - T.toVector(Str); - return MakeArgString(Str.str()); + return MakeArgString(T.toStringRef(Str)); } const char *ArgList::GetOrMakeJoinedArgString(unsigned Index,