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 | 435654b18135bb5482a029bf359c4c2c7a5c2816 (patch) | |
tree | 07cbec4b95fdf8db5f73f8cbf3052b3fb12d2dae /lib/VMCore | |
parent | c966e08a9895a39f575d917a8390c8e359f042f5 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AttributeImpl.h | 4 | ||||
-rw-r--r-- | lib/VMCore/Attributes.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/VMCore/AttributeImpl.h b/lib/VMCore/AttributeImpl.h index 253d6e82eb..65ac3ea982 100644 --- a/lib/VMCore/AttributeImpl.h +++ b/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/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp index ad1af45f85..a1e0856971 100644 --- a/lib/VMCore/Attributes.cpp +++ b/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 //===----------------------------------------------------------------------===// |