summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1f69d31)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222553
91177308-0d34-0410-b5e6-
96231b3b80d8
element_iterator element_begin() const { return ContainedTys; }
element_iterator element_end() const { return &ContainedTys[NumContainedTys];}
element_iterator element_begin() const { return ContainedTys; }
element_iterator element_end() const { return &ContainedTys[NumContainedTys];}
+ ArrayRef<Type *> const elements() const {
+ return ArrayRef<Type*>(&*element_begin(), getNumElements());
+ }
+
/// isLayoutIdentical - Return true if this is layout identical to the
/// specified struct.
bool isLayoutIdentical(StructType *Other) const;
/// isLayoutIdentical - Return true if this is layout identical to the
/// specified struct.
bool isLayoutIdentical(StructType *Other) const;
bool isPacked;
KeyTy(const ArrayRef<Type*>& E, bool P) :
ETypes(E), isPacked(P) {}
bool isPacked;
KeyTy(const ArrayRef<Type*>& E, bool P) :
ETypes(E), isPacked(P) {}
- KeyTy(const StructType* ST) :
- ETypes(ArrayRef<Type*>(ST->element_begin(), ST->element_end())),
- isPacked(ST->isPacked()) {}
+ KeyTy(const StructType *ST)
+ : ETypes(ST->elements()), isPacked(ST->isPacked()) {}
bool operator==(const KeyTy& that) const {
if (isPacked != that.isPacked)
return false;
bool operator==(const KeyTy& that) const {
if (isPacked != that.isPacked)
return false;