diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-30 01:23:08 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-30 01:23:08 +0000 |
commit | 5e8ff877f49afa80913eef8533d8ee2d86599f92 (patch) | |
tree | 8be47299d0d7b2bf99251e67c5c11bc967f29939 | |
parent | 3e4c4c960735e8c097b2489f9e30f4d4730e7367 (diff) | |
download | bcm5719-llvm-5e8ff877f49afa80913eef8533d8ee2d86599f92.tar.gz bcm5719-llvm-5e8ff877f49afa80913eef8533d8ee2d86599f92.zip |
Uniquify the AttributeImpl based on the Constant pointer, since those are
already uniquified.
Note: This will be expanded in the future to add more than just one pointer
value.
llvm-svn: 171245
-rw-r--r-- | llvm/lib/VMCore/AttributeImpl.h | 4 | ||||
-rw-r--r-- | llvm/lib/VMCore/Attributes.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/AttributeImpl.h b/llvm/lib/VMCore/AttributeImpl.h index 253d6e82eb7..65ac3ea9823 100644 --- a/llvm/lib/VMCore/AttributeImpl.h +++ b/llvm/lib/VMCore/AttributeImpl.h @@ -49,7 +49,9 @@ public: void Profile(FoldingSetNodeID &ID) const { Profile(ID, Data); } - static void Profile(FoldingSetNodeID &ID, Constant *Data); + static void Profile(FoldingSetNodeID &ID, Constant *Data) { + ID.AddPointer(Data); + } }; //===----------------------------------------------------------------------===// diff --git a/llvm/lib/VMCore/Attributes.cpp b/llvm/lib/VMCore/Attributes.cpp index ad1af45f855..a1e0856971d 100644 --- a/llvm/lib/VMCore/Attributes.cpp +++ b/llvm/lib/VMCore/Attributes.cpp @@ -363,10 +363,6 @@ uint64_t AttributeImpl::getStackAlignment() const { return getBitMask() & getAttrMask(Attribute::StackAlignment); } -void AttributeImpl::Profile(FoldingSetNodeID &ID, Constant *Data) { - ID.AddInteger(cast<ConstantInt>(Data)->getZExtValue()); -} - //===----------------------------------------------------------------------===// // AttributeSetImpl Definition //===----------------------------------------------------------------------===// |