[llvm] r184291 - MachOUniversal.cpp: Fix abuse of Twine. It would be sufficient to use std::string instead.
NAKAMURA Takumi
geek4civic at gmail.com
Wed Jun 19 02:55:06 PDT 2013
Author: chapuni
Date: Wed Jun 19 04:55:05 2013
New Revision: 184291
URL: http://llvm.org/viewvc/llvm-project?rev=184291&view=rev
Log:
MachOUniversal.cpp: Fix abuse of Twine. It would be sufficient to use std::string instead.
Modified:
llvm/trunk/lib/Object/MachOUniversal.cpp
Modified: llvm/trunk/lib/Object/MachOUniversal.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOUniversal.cpp?rev=184291&r1=184290&r2=184291&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOUniversal.cpp (original)
+++ llvm/trunk/lib/Object/MachOUniversal.cpp Wed Jun 19 04:55:05 2013
@@ -77,11 +77,11 @@ error_code MachOUniversalBinary::ObjectF
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;
More information about the llvm-commits
mailing list