llvm.org GIT mirror llvm / 445cfd7
Avoid buffer copies when a Twine already is a StringRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196301 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 5 years ago
2 changed file(s) with 2 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
156156
157157 MCSymbol *MCContext::GetOrCreateSymbol(const Twine &Name) {
158158 SmallString<128> NameSV;
159 Name.toVector(NameSV);
160 return GetOrCreateSymbol(NameSV.str());
159 return GetOrCreateSymbol(Name.toStringRef(NameSV));
161160 }
162161
163162 MCSymbol *MCContext::CreateTempSymbol() {
290290
291291 const char *ArgList::MakeArgString(const Twine &T) const {
292292 SmallString<256> Str;
293 T.toVector(Str);
294 return MakeArgString(Str.str());
293 return MakeArgString(T.toStringRef(Str));
295294 }
296295
297296 const char *ArgList::GetOrMakeJoinedArgString(unsigned Index,