<div dir="ltr">Good to have a reason in the commit message/patch description - I assume it's because std::to_string isn't available on some platforms? At least that's what I recall seeing in previous patches.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 27, 2016 at 3:50 PM, Chaoren Lin via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">chaoren created this revision.<br>
chaoren added reviewers: lhames, ovyalov, chandlerc.<br>
chaoren added a subscriber: llvm-commits.<br>
<br>
<a href="http://reviews.llvm.org/D19638" rel="noreferrer" target="_blank">http://reviews.llvm.org/D19638</a><br>
<br>
Files:<br>
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h<br>
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h<br>
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h<br>
<br>
Index: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h<br>
===================================================================<br>
--- lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h<br>
+++ lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h<br>
@@ -64,9 +64,9 @@<br>
UNIMPLEMENTED_RELOC(MachO::X86_64_RELOC_TLV);<br>
default:<br>
if (RelType > MachO::X86_64_RELOC_TLV)<br>
- return make_error<RuntimeDyldError>("MachO X86_64 relocation type " +<br>
- std::to_string(RelType) +<br>
- " is out of range");<br>
+ return make_error<RuntimeDyldError>(("MachO X86_64 relocation type " +<br>
+ Twine(RelType) +<br>
+ " is out of range").str());<br>
break;<br>
}<br>
<br>
Index: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h<br>
===================================================================<br>
--- lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h<br>
+++ lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h<br>
@@ -49,19 +49,19 @@<br>
ObjSectionToID);<br>
else if (RelType == MachO::GENERIC_RELOC_VANILLA)<br>
return processScatteredVANILLA(SectionID, RelI, Obj, ObjSectionToID);<br>
- return make_error<RuntimeDyldError>("Unhandled I386 scattered relocation "<br>
- "type: " + std::to_string(RelType));<br>
+ return make_error<RuntimeDyldError>(("Unhandled I386 scattered relocation "<br>
+ "type: " + Twine(RelType)).str());<br>
}<br>
<br>
switch (RelType) {<br>
UNIMPLEMENTED_RELOC(MachO::GENERIC_RELOC_PAIR);<br>
UNIMPLEMENTED_RELOC(MachO::GENERIC_RELOC_PB_LA_PTR);<br>
UNIMPLEMENTED_RELOC(MachO::GENERIC_RELOC_TLV);<br>
default:<br>
if (RelType > MachO::GENERIC_RELOC_TLV)<br>
- return make_error<RuntimeDyldError>("MachO I386 relocation type " +<br>
- std::to_string(RelType) +<br>
- " is out of range");<br>
+ return make_error<RuntimeDyldError>(("MachO I386 relocation type " +<br>
+ Twine(RelType) +<br>
+ " is out of range").str());<br>
break;<br>
}<br>
<br>
Index: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h<br>
===================================================================<br>
--- lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h<br>
+++ lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h<br>
@@ -82,9 +82,9 @@<br>
UNIMPLEMENTED_RELOC(MachO::ARM_RELOC_HALF);<br>
default:<br>
if (RelType > MachO::ARM_RELOC_HALF_SECTDIFF)<br>
- return make_error<RuntimeDyldError>("MachO ARM relocation type " +<br>
- std::to_string(RelType) +<br>
- " is out of range");<br>
+ return make_error<RuntimeDyldError>(("MachO ARM relocation type " +<br>
+ Twine(RelType) +<br>
+ " is out of range").str());<br>
break;<br>
}<br>
<br>
<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>