Use llvm:Twine instead of std::to_string.

std::to_string is not available from the Android NDK.

Reviewers: lhames, ovyalov, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D19638

llvm-svn: 267829
This commit is contained in:
Chaoren Lin 2016-04-28 00:49:37 +00:00
parent f46c273977
commit 49317f2d90
3 changed files with 11 additions and 11 deletions

View File

@ -82,9 +82,9 @@ public:
UNIMPLEMENTED_RELOC(MachO::ARM_RELOC_HALF);
default:
if (RelType > MachO::ARM_RELOC_HALF_SECTDIFF)
return make_error<RuntimeDyldError>("MachO ARM relocation type " +
std::to_string(RelType) +
" is out of range");
return make_error<RuntimeDyldError>(("MachO ARM relocation type " +
Twine(RelType) +
" is out of range").str());
break;
}

View File

@ -49,8 +49,8 @@ public:
ObjSectionToID);
else if (RelType == MachO::GENERIC_RELOC_VANILLA)
return processScatteredVANILLA(SectionID, RelI, Obj, ObjSectionToID);
return make_error<RuntimeDyldError>("Unhandled I386 scattered relocation "
"type: " + std::to_string(RelType));
return make_error<RuntimeDyldError>(("Unhandled I386 scattered relocation "
"type: " + Twine(RelType)).str());
}
switch (RelType) {
@ -59,9 +59,9 @@ public:
UNIMPLEMENTED_RELOC(MachO::GENERIC_RELOC_TLV);
default:
if (RelType > MachO::GENERIC_RELOC_TLV)
return make_error<RuntimeDyldError>("MachO I386 relocation type " +
std::to_string(RelType) +
" is out of range");
return make_error<RuntimeDyldError>(("MachO I386 relocation type " +
Twine(RelType) +
" is out of range").str());
break;
}

View File

@ -64,9 +64,9 @@ public:
UNIMPLEMENTED_RELOC(MachO::X86_64_RELOC_TLV);
default:
if (RelType > MachO::X86_64_RELOC_TLV)
return make_error<RuntimeDyldError>("MachO X86_64 relocation type " +
std::to_string(RelType) +
" is out of range");
return make_error<RuntimeDyldError>(("MachO X86_64 relocation type " +
Twine(RelType) +
" is out of range").str());
break;
}