Skip to content

Commit

Permalink
Use llvm:Twine instead of std::to_string.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chaoren committed Apr 28, 2016
1 parent f46c273 commit 49317f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Expand Up @@ -82,9 +82,9 @@ class RuntimeDyldMachOARM
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;
}

Expand Down
Expand Up @@ -49,8 +49,8 @@ class RuntimeDyldMachOI386
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) {
Expand All @@ -59,9 +59,9 @@ class RuntimeDyldMachOI386
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;
}

Expand Down
Expand Up @@ -64,9 +64,9 @@ class RuntimeDyldMachOX86_64
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;
}

Expand Down

0 comments on commit 49317f2

Please sign in to comment.