Fix hashing of llvm type
This commit is contained in:
parent
db7323771f
commit
331f71f26f
2 changed files with 29 additions and 1 deletions
|
|
@ -800,6 +800,9 @@ class Type(llvm.Wrapper):
|
|||
def __str__(self):
|
||||
return str(self._ptr)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self._ptr)
|
||||
|
||||
def __eq__(self, rhs):
|
||||
return self._ptr is rhs._ptr
|
||||
|
||||
|
|
@ -901,7 +904,6 @@ class StructType(Type):
|
|||
def is_layout_identical(self, other):
|
||||
return self._ptr.isLayoutIdentical(other._ptr)
|
||||
|
||||
|
||||
class ArrayType(Type):
|
||||
"""Represents an array type."""
|
||||
_type_ = api.llvm.ArrayType
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue