<div dir="ltr">Cool. Thanks Chaoren!<div><br></div><div>- Lang.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 27, 2016 at 5:49 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">Author: chaoren<br>
Date: Wed Apr 27 19:49:37 2016<br>
New Revision: 267829<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=267829&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=267829&view=rev</a><br>
Log:<br>
Use llvm:Twine instead of std::to_string.<br>
<br>
std::to_string is not available from the Android NDK.<br>
<br>
Reviewers: lhames, ovyalov, chandlerc<br>
<br>
Subscribers: llvm-commits<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D19638" rel="noreferrer" target="_blank">http://reviews.llvm.org/D19638</a><br>
<br>
Modified:<br>
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h<br>
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h<br>
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h?rev=267829&r1=267828&r2=267829&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h?rev=267829&r1=267828&r2=267829&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h Wed Apr 27 19:49:37 2016<br>
@@ -82,9 +82,9 @@ public:<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>
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h?rev=267829&r1=267828&r2=267829&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h?rev=267829&r1=267828&r2=267829&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h Wed Apr 27 19:49:37 2016<br>
@@ -49,8 +49,8 @@ public:<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>
@@ -59,9 +59,9 @@ public:<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>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h?rev=267829&r1=267828&r2=267829&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h?rev=267829&r1=267828&r2=267829&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h Wed Apr 27 19:49:37 2016<br>
@@ -64,9 +64,9 @@ public:<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>
<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>
</blockquote></div><br></div>