From f9326c248ad49a0bba3253d0473051b7094455c7 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 19 Jun 2013 09:55:05 +0000 Subject: [PATCH] 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 --- lib/Object/MachOUniversal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Object/MachOUniversal.cpp b/lib/Object/MachOUniversal.cpp index 98f7198bdb1..b76f10eb6db 100644 --- a/lib/Object/MachOUniversal.cpp +++ b/lib/Object/MachOUniversal.cpp @@ -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;