MachOUniversal.cpp: Fix abuse of Twine. It would be sufficient to use std::string instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2013-06-19 09:55:05 +00:00
parent 15c6aa9147
commit f9326c248a

View File

@ -77,11 +77,11 @@ error_code MachOUniversalBinary::ObjectForArch::getAsObjectFile(
if (Parent) {
StringRef ParentData = Parent->getData();
StringRef ObjectData = ParentData.substr(Header.Offset, Header.Size);
Twine ObjectName =
Twine(Parent->getFileName()) + ":" +
std::string ObjectName =
Parent->getFileName().str() + ":" +
Triple::getArchTypeName(MachOObjectFile::getArch(Header.CPUType));
MemoryBuffer *ObjBuffer = MemoryBuffer::getMemBuffer(
ObjectData, ObjectName.str(), false);
ObjectData, ObjectName, false);
if (ObjectFile *Obj = ObjectFile::createMachOObjectFile(ObjBuffer)) {
Result.reset(Obj);
return object_error::success;