<div dir="ltr"><div class="gmail_default" style>Hey, I touched this up in r171614. The commit log there records the details of what I think was going wrong here. Let me know if that doesn't make sense to you.</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 4, 2013 at 11:55 PM, NAKAMURA Takumi <span dir="ltr"><<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: chapuni<br>
Date: Sat Jan  5 01:55:47 2013<br>
New Revision: 171611<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=171611&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=171611&view=rev</a><br>
Log:<br>
IR/Attributes: Provide EmptyKey and TombstoneKey in part of enum, as workaround for gcc-4.4 take #2.<br>
<br>
I will investigate, later, what was wrong. I am too tired for now.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/IR/Attributes.h<br>
    llvm/trunk/lib/IR/Attributes.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/IR/Attributes.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=171611&r1=171610&r2=171611&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=171611&r1=171610&r2=171611&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/IR/Attributes.h (original)<br>
+++ llvm/trunk/include/llvm/IR/Attributes.h Sat Jan  5 01:55:47 2013<br>
@@ -93,7 +93,11 @@<br>
     UWTable,               ///< Function must be in a unwind table<br>
     ZExt,                  ///< Zero extended before/after call<br>
<br>
-    EndAttrKinds           ///< Sentinal value useful for loops<br>
+    EndAttrKinds,          ///< Sentinal value useful for loops<br>
+<br>
+    // Values for DenseMapInfo<br>
+    EmptyKey     = 0x7FFFFFFF,<br>
+    TombstoneKey = -0x7FFFFFFF - 1<br>
   };<br>
 private:<br>
   AttributeImpl *pImpl;<br>
@@ -165,10 +169,10 @@<br>
 /// AttrBuilder.<br>
 template<> struct DenseMapInfo<Attribute::AttrKind> {<br>
   static inline Attribute::AttrKind getEmptyKey() {<br>
-    return Attribute::AttrKind(~0U);<br>
+    return Attribute::EmptyKey;<br>
   }<br>
   static inline Attribute::AttrKind getTombstoneKey() {<br>
-    return Attribute::AttrKind(~0U - 1);<br>
+    return Attribute::TombstoneKey;<br>
   }<br>
   static unsigned getHashValue(const Attribute::AttrKind &Val) {<br>
     return Val * 37U;<br>
<br>
Modified: llvm/trunk/lib/IR/Attributes.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=171611&r1=171610&r2=171611&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=171611&r1=171610&r2=171611&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/IR/Attributes.cpp (original)<br>
+++ llvm/trunk/lib/IR/Attributes.cpp Sat Jan  5 01:55:47 2013<br>
@@ -426,6 +426,8 @@<br>
 uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) {<br>
   switch (Val) {<br>
   case Attribute::EndAttrKinds:    break;<br>
+  case Attribute::EmptyKey:        break;<br>
+  case Attribute::TombstoneKey:    break;<br>
   case Attribute::None:            return 0;<br>
   case Attribute::ZExt:            return 1 << 0;<br>
   case Attribute::SExt:            return 1 << 1;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>