<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 27, 2011, at 11:42 AM, Eli Friedman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Fri, May 27, 2011 at 11:15 AM, Devang Patel <<a href="mailto:dpatel@apple.com">dpatel@apple.com</a>> wrote:<br><blockquote type="cite">Author: dpatel<br></blockquote><blockquote type="cite">Date: Fri May 27 13:15:52 2011<br></blockquote><blockquote type="cite">New Revision: 132197<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=132197&view=rev">http://llvm.org/viewvc/llvm-project?rev=132197&view=rev</a><br></blockquote><blockquote type="cite">Log:<br></blockquote><blockquote type="cite">Handle signed types gracefully.<br></blockquote><blockquote type="cite">This fixes regressions reported by buildbots as a fallout of r132193.<br></blockquote><br>Still broken; see<br><a href="http://smooshlab.apple.com:8013/builders/clang-x86_64-darwin10-gcc42-RA/builds/3462/steps/run.llvm.tests/logs/LLVM%20%3A%3A%20CodeGen___X86___dbg-const-int.ll">http://smooshlab.apple.com:8013/builders/clang-x86_64-darwin10-gcc42-RA/builds/3462/steps/run.llvm.tests/logs/LLVM%20%3A%3A%20CodeGen___X86___dbg-const-int.ll</a><br><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div>I am investigating this.</div><div>-</div><div>Devang<br><blockquote type="cite"><div>-Eli<br><br><blockquote type="cite">Modified:<br></blockquote><blockquote type="cite">   llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br></blockquote><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=132197&r1=132196&r2=132197&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=132197&r1=132196&r2=132197&view=diff</a><br></blockquote><blockquote type="cite">==============================================================================<br></blockquote><blockquote type="cite">--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)<br></blockquote><blockquote type="cite">+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri May 27 13:15:52 2011<br></blockquote><blockquote type="cite">@@ -444,16 +444,28 @@<br></blockquote><blockquote type="cite">                                   DIType Ty) {<br></blockquote><blockquote type="cite">  assert (MO.isImm() && "Invalid machine operand!");<br></blockquote><blockquote type="cite">  DIEBlock *Block = new (DIEValueAllocator) DIEBlock();<br></blockquote><blockquote type="cite">-  unsigned Imm = MO.getImm();<br></blockquote><blockquote type="cite">  unsigned form = dwarf::DW_FORM_udata;<br></blockquote><blockquote type="cite">-  switch (Ty.getSizeInBits()) {<br></blockquote><blockquote type="cite">-    case 8: form = dwarf::DW_FORM_data1; break;<br></blockquote><blockquote type="cite">-    case 16: form = dwarf::DW_FORM_data2; break;<br></blockquote><blockquote type="cite">-    case 32: form = dwarf::DW_FORM_data4; break;<br></blockquote><blockquote type="cite">-    case 64: form = dwarf::DW_FORM_data8; break;<br></blockquote><blockquote type="cite">-    default: break;<br></blockquote><blockquote type="cite">-  }<br></blockquote><blockquote type="cite">-  addUInt(Block, 0, form, Imm);<br></blockquote><blockquote type="cite">+  DIBasicType BTy(Ty);<br></blockquote><blockquote type="cite">+  if (BTy.Verify()) {<br></blockquote><blockquote type="cite">+    unsigned Encoding = BTy.getEncoding();<br></blockquote><blockquote type="cite">+    if (Encoding == dwarf::DW_ATE_signed ||<br></blockquote><blockquote type="cite">+        Encoding == dwarf::DW_ATE_signed_char) {<br></blockquote><blockquote type="cite">+      form = dwarf::DW_FORM_sdata;<br></blockquote><blockquote type="cite">+      addSInt(Block, 0, dwarf::DW_FORM_sdata, MO.getImm());<br></blockquote><blockquote type="cite">+    } else {<br></blockquote><blockquote type="cite">+      switch (Ty.getSizeInBits()) {<br></blockquote><blockquote type="cite">+        case 8: form = dwarf::DW_FORM_data1; break;<br></blockquote><blockquote type="cite">+        case 16: form = dwarf::DW_FORM_data2; break;<br></blockquote><blockquote type="cite">+        case 32: form = dwarf::DW_FORM_data4; break;<br></blockquote><blockquote type="cite">+        case 64: form = dwarf::DW_FORM_data8; break;<br></blockquote><blockquote type="cite">+        default: break;<br></blockquote><blockquote type="cite">+      }<br></blockquote><blockquote type="cite">+      addUInt(Block, 0, form, MO.getImm());<br></blockquote><blockquote type="cite">+    }<br></blockquote><blockquote type="cite">+  } else<br></blockquote><blockquote type="cite">+    //if this is not basic type then just use _udata.<br></blockquote><blockquote type="cite">+    addUInt(Block, 0, form, MO.getImm());<br></blockquote><blockquote type="cite">+<br></blockquote><blockquote type="cite">  addBlock(Die, dwarf::DW_AT_const_value, 0, Block);<br></blockquote><blockquote type="cite">  return true;<br></blockquote><blockquote type="cite"> }<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">llvm-commits mailing list<br></blockquote><blockquote type="cite"><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br></blockquote><blockquote type="cite"><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote><blockquote type="cite"><br></blockquote></div></blockquote></div><br></body></html>