mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 08:29:43 +00:00
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:
parent
15c6aa9147
commit
f9326c248a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user