Alter the hasing computation when inserting into the folding set.
authorBill Wendling <isanbard@gmail.com>
Wed, 9 Jan 2013 09:26:23 +0000 (09:26 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 9 Jan 2013 09:26:23 +0000 (09:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171960 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Attributes.cpp

index cdea3500bb2c3ad9e8d9e6b83431f4adbaacbf9a..a1f306c0ce16cf110de8818cd83bc7839daf9ee5 100644 (file)
@@ -45,8 +45,7 @@ Attribute Attribute::get(LLVMContext &Context, AttrBuilder &B) {
   // Otherwise, build a key to look up the existing attributes.
   LLVMContextImpl *pImpl = Context.pImpl;
   FoldingSetNodeID ID;
-  // FIXME: Don't look up ConstantInts here.
-  ID.AddPointer(ConstantInt::get(Type::getInt64Ty(Context), B.getBitMask()));
+  ID.AddInteger(B.getBitMask());
 
   void *InsertPoint;
   AttributeImpl *PA = pImpl->AttrsSet.FindNodeOrInsertPos(ID, InsertPoint);