diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-12 08:01:22 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-12 08:01:22 +0000 |
commit | 105ea3d49d4a458af8779ae7f144f00d19c4168f (patch) | |
tree | 53e71f310903ccfc74457d8da4bdc04c9b866a18 /lib/Bitcode/Writer/ValueEnumerator.h | |
parent | 74fe825ca597f56985ab4387baca35948647ec4b (diff) |
Use the AttributeSet as the 'key' to the map instead of the 'raw' pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/ValueEnumerator.h')
-rw-r--r-- | lib/Bitcode/Writer/ValueEnumerator.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bitcode/Writer/ValueEnumerator.h b/lib/Bitcode/Writer/ValueEnumerator.h index 33db52388a..0af6164c94 100644 --- a/lib/Bitcode/Writer/ValueEnumerator.h +++ b/lib/Bitcode/Writer/ValueEnumerator.h @@ -56,7 +56,7 @@ private: AttributeGroupMapType AttributeGroupMap; std::vector<AttributeSet> AttributeGroups; - typedef DenseMap<void*, unsigned> AttributeMapType; + typedef DenseMap<AttributeSet, unsigned> AttributeMapType; AttributeMapType AttributeMap; std::vector<AttributeSet> Attribute; @@ -104,7 +104,7 @@ public: unsigned getAttributeID(AttributeSet PAL) const { if (PAL.isEmpty()) return 0; // Null maps to zero. - AttributeMapType::const_iterator I = AttributeMap.find(PAL.getRawPointer()); + AttributeMapType::const_iterator I = AttributeMap.find(PAL); assert(I != AttributeMap.end() && "Attribute not in ValueEnumerator!"); return I->second; } @@ -160,7 +160,7 @@ private: void EnumerateValue(const Value *V); void EnumerateType(Type *T); void EnumerateOperandType(const Value *V); - void EnumerateAttributes(const AttributeSet &PAL); + void EnumerateAttributes(AttributeSet PAL); void EnumerateValueSymbolTable(const ValueSymbolTable &ST); void EnumerateNamedMetadata(const Module *M); |