<div dir="ltr">Seems reasonable.<div><br></div><div>If you haven't feel free to fix the formatting of that line too ;)</div><div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 4, 2016 at 10:32 AM Robinson, Paul <<a href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">It *almost* works… with a smallish file of adapters and minor tweaks to clang-format.el itself, it actually would be working except that the XEmacs version
 of xml.el doesn't translate things like ?#10; to \n (the GNU Emacs version of xml.el does this).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Doing the degree of elisp programming to translate that stuff myself exceeds my "worth it" threshold, so I'll probably just train myself to start using clang-format-diff.py
 instead.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><a name="msg-f:1522461429671574743__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> llvm-commits [mailto:<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>Robinson, Paul via llvm-commits<br>
<b>Sent:</b> Wednesday, December 30, 2015 11:18 AM<br>
<b>To:</b> Eric Christopher; <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<b>Subject:</b> RE: [llvm] r256313 - Form reform for MCDwarf.<u></u><u></u></span></p>
</div>
</div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">So far, I have:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">removed the (require 'cl-lib) as xemacs has cl by default<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">removed the :risky and :safe stuff<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">replaced (use-region-p) with (region-active-p)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Latest stumbling block is that xemacs does not have position-bytes.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I'm not super sophisticated with elisp and not spending a lot of time on it this week. If you're willing to have a go at it, that would be great.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Eric Christopher [<a href="mailto:echristo@gmail.com" target="_blank">mailto:echristo@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, December 29, 2015 7:40 PM<br>
<b>To:</b> Robinson, Paul; <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm] r256313 - Form reform for MCDwarf.<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p>Hmm, haven't checked the elisp differences between the two in a while, what's the problem?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Tue, Dec 29, 2015, 7:04 PM Robinson, Paul <<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank">Paul_Robinson@playstation.sony.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">No, it's not.  Sorry, I slipped up on the manual formatting.  Guess it's time to get serious about
 an xemacs variant of clang-format.el (or switch to that other emacs).</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I'll fix up the patch in the near future (technically I'm on holiday this week).</span><u></u><u></u></p>
<p class="MsoNormal"><a name="msg-f:1522461429671574743_msg-f:1521950062257496004__MailEndCompos"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr</span></a><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Eric Christopher [mailto:<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>]
<br>
<b>Sent:</b> Monday, December 28, 2015 10:40 AM<br>
<b>To:</b> Robinson, Paul; <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">
llvm-commits@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm] r256313 - Form reform for MCDwarf.</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">Hi Paul,<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal"><br>
+    EmitAbbrev(MCOS, dwarf::DW_AT_ranges,<br>
+               context.getDwarfVersion() >= 4 ? dwarf::DW_FORM_sec_offset<br>
+                                              : dwarf::DW_FORM_data4);<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Is this bit clang-formatted?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">-eric<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal">   } else {<br>
     EmitAbbrev(MCOS, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr);<br>
     EmitAbbrev(MCOS, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr);<br>
<br>
Modified: llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s?rev=256313&r1=256312&r2=256313&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s?rev=256313&r1=256312&r2=256313&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s (original)<br>
+++ llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s Tue Dec 22 19:57:31 2015<br>
@@ -25,7 +25,7 @@ b:<br>
<br>
 // DWARF: .debug_info contents:<br>
 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1]<br>
-// CHECK-NOT-DWARF: DW_TAG_<br>
+// DWARF-NOT: DW_TAG_<br>
 // DWARF:               DW_AT_low_pc [DW_FORM_addr]       (0x0000000000000000)<br>
 // DWARF:               DW_AT_high_pc [DW_FORM_addr]      (0x0000000000000004)<br>
<br>
<br>
Modified: llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections.s?rev=256313&r1=256312&r2=256313&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections.s?rev=256313&r1=256312&r2=256313&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections.s (original)<br>
+++ llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections.s Tue Dec 22 19:57:31 2015<br>
@@ -1,6 +1,8 @@<br>
 // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp<br>
-// RUN: llvm-dwarfdump %t | FileCheck -check-prefix DWARF %s<br>
+// RUN: llvm-dwarfdump %t | FileCheck -check-prefix DWARF -check-prefix DWARF4 %s<br>
 // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s<br>
+// RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 3 -fdebug-compilation-dir=/tmp<br>
+// RUN: llvm-dwarfdump %t | FileCheck -check-prefix DWARF -check-prefix DWARF3 %s<br>
 // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 2 2>&1 | FileCheck -check-prefix VERSION %s<br>
 // RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 1 2>&1 | FileCheck -check-prefix DWARF1 %s<br>
 // RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 5 2>&1 | FileCheck -check-prefix DWARF5 %s<br>
@@ -15,8 +17,10 @@ b:<br>
 // DWARF: .debug_abbrev contents:<br>
 // DWARF: Abbrev table for offset: 0x00000000<br>
 // DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes<br>
-// DWARF:         DW_AT_stmt_list DW_FORM_data4<br>
-// DWARF:         DW_AT_ranges    DW_FORM_data4<br>
+// DWARF3:        DW_AT_stmt_list DW_FORM_data4<br>
+// DWARF4:        DW_AT_stmt_list DW_FORM_sec_offset<br>
+// DWARF3:        DW_AT_ranges    DW_FORM_data4<br>
+// DWARF4:        DW_AT_ranges    DW_FORM_sec_offset<br>
 // DWARF:         DW_AT_name      DW_FORM_string<br>
 // DWARF:         DW_AT_comp_dir  DW_FORM_string<br>
 // DWARF:         DW_AT_producer  DW_FORM_string<br>
@@ -24,8 +28,9 @@ b:<br>
<br>
 // DWARF: .debug_info contents:<br>
 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1]<br>
-// CHECK-NOT-DWARF: DW_TAG_<br>
-// DWARF: DW_AT_ranges [DW_FORM_data4]      (0x00000000<br>
+// DWARF-NOT: DW_TAG_<br>
+// DWARF3: DW_AT_ranges [DW_FORM_data4]           (0x00000000<br>
+// DWARF4: DW_AT_ranges [DW_FORM_sec_offset]      (0x00000000<br>
<br>
 // DWARF: 0x{{[0-9a-f]+}}:   DW_TAG_label [2] *<br>
 // DWARF-NEXT: DW_AT_name [DW_FORM_string]     ("a")<br>
@@ -41,10 +46,10 @@ b:<br>
<br>
<br>
 // DWARF: .debug_line contents:<br>
-// DWARF:      0x0000000000000000      9      0      1   0   0  is_stmt<br>
-// DWARF-NEXT: 0x0000000000000004      9      0      1   0   0  is_stmt end_sequence<br>
-// DWARF-NEXT: 0x0000000000000000     13      0      1   0   0  is_stmt<br>
-// DWARF-NEXT: 0x0000000000000004     13      0      1   0   0  is_stmt end_sequence<br>
+// DWARF:      0x0000000000000000     11      0      1   0   0  is_stmt<br>
+// DWARF-NEXT: 0x0000000000000004     11      0      1   0   0  is_stmt end_sequence<br>
+// DWARF-NEXT: 0x0000000000000000     15      0      1   0   0  is_stmt<br>
+// DWARF-NEXT: 0x0000000000000004     15      0      1   0   0  is_stmt end_sequence<br>
<br>
<br>
 // DWARF: .debug_ranges contents:<br>
<br>
Modified: llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s?rev=256313&r1=256312&r2=256313&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s?rev=256313&r1=256312&r2=256313&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s (original)<br>
+++ llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s Tue Dec 22 19:57:31 2015<br>
@@ -9,7 +9,7 @@ b:<br>
 // DWARF: .debug_abbrev contents:<br>
 // DWARF: Abbrev table for offset: 0x00000000<br>
 // DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes<br>
-// DWARF:         DW_AT_stmt_list DW_FORM_data4<br>
+// DWARF:         DW_AT_stmt_list DW_FORM_sec_offset<br>
 // DWARF:         DW_AT_low_pc    DW_FORM_addr<br>
 // DWARF:         DW_AT_high_pc   DW_FORM_addr<br>
 // DWARF:         DW_AT_name      DW_FORM_string<br>
<br>
Modified: llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s?rev=256313&r1=256312&r2=256313&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s?rev=256313&r1=256312&r2=256313&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s (original)<br>
+++ llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s Tue Dec 22 19:57:31 2015<br>
@@ -10,7 +10,7 @@ a:<br>
 // DWARF: .debug_abbrev contents:<br>
 // DWARF: Abbrev table for offset: 0x00000000<br>
 // DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes<br>
-// DWARF:         DW_AT_stmt_list DW_FORM_data4<br>
+// DWARF:         DW_AT_stmt_list DW_FORM_sec_offset<br>
 // DWARF:         DW_AT_low_pc    DW_FORM_addr<br>
 // DWARF:         DW_AT_high_pc   DW_FORM_addr<br>
 // DWARF:         DW_AT_name      DW_FORM_string<br>
@@ -20,7 +20,7 @@ a:<br>
<br>
 // DWARF: .debug_info contents:<br>
 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1]<br>
-// CHECK-NOT-DWARF: DW_TAG_<br>
+// DWARF-NOT: DW_TAG_<br>
 // DWARF:               DW_AT_low_pc [DW_FORM_addr]       (0x0000000000000000)<br>
 // DWARF:               DW_AT_high_pc [DW_FORM_addr]      (0x0000000000000004)<br>
<br>
<br>
Modified: llvm/trunk/test/MC/MachO/gen-dwarf.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/gen-dwarf.s?rev=256313&r1=256312&r2=256313&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/gen-dwarf.s?rev=256313&r1=256312&r2=256313&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/MC/MachO/gen-dwarf.s (original)<br>
+++ llvm/trunk/test/MC/MachO/gen-dwarf.s Tue Dec 22 19:57:31 2015<br>
@@ -17,7 +17,7 @@ _x:   .long 1<br>
 // CHECK: .debug_abbrev contents:<br>
 // CHECK: Abbrev table for offset: 0x00000000<br>
 // CHECK: [1] DW_TAG_compile_unit      DW_CHILDREN_yes<br>
-// CHECK:      DW_AT_stmt_list DW_FORM_data4<br>
+// CHECK:      DW_AT_stmt_list DW_FORM_sec_offset<br>
 // CHECK:      DW_AT_low_pc    DW_FORM_addr<br>
 // CHECK:      DW_AT_high_pc   DW_FORM_addr<br>
 // CHECK:      DW_AT_name      DW_FORM_string<br>
@@ -39,7 +39,7 @@ _x:   .long 1<br>
<br>
 // We don't check the leading addresses these are at.<br>
 // CHECK:  DW_TAG_compile_unit [1] *<br>
-// CHECK:    DW_AT_stmt_list [DW_FORM_data4]   (0x00000000)<br>
+// CHECK:    DW_AT_stmt_list [DW_FORM_sec_offset]      (0x00000000)<br>
 // CHECK:    DW_AT_low_pc [DW_FORM_addr]       (0x0000000000000000)<br>
 // CHECK:    DW_AT_high_pc [DW_FORM_addr]      (0x0000000000000008)<br>
 // We don't check the file name as it is a temp directory<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div></div></div></blockquote></div>