diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-01-05 12:08:00 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-01-05 12:08:00 +0000 |
commit | f06eb2616516da9d1e7a6599225cd894618ecb10 (patch) | |
tree | 13ce57f7d311fcb45938d33b95e5d2eca9b6e83e | |
parent | b24ce3ec45be18dda4dd5d1d848871ef680b7f72 (diff) |
Attribute: Make hashes match when looking up AttributeImpls.
This isn't optimal either but fixes a massive compile time regression from the
attribute uniquing work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171624 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/IR/Attributes.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index c0704dc97b..117b510288 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -45,7 +45,8 @@ Attribute Attribute::get(LLVMContext &Context, AttrBuilder &B) { // Otherwise, build a key to look up the existing attributes. LLVMContextImpl *pImpl = Context.pImpl; FoldingSetNodeID ID; - ID.AddInteger(B.getBitMask()); + // FIXME: Don't look up ConstantInts here. + ID.AddPointer(ConstantInt::get(Type::getInt64Ty(Context), B.getBitMask())); void *InsertPoint; AttributeImpl *PA = pImpl->AttrsSet.FindNodeOrInsertPos(ID, InsertPoint); |