projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add and use a helper elements() to StructType. NFC.
[oota-llvm.git]
/
lib
/
IR
/
LLVMContextImpl.h
diff --git
a/lib/IR/LLVMContextImpl.h
b/lib/IR/LLVMContextImpl.h
index e743ec3abc45ca22b7d9b4ad9cdd30269f09e707..f018dc737508a134120d9585b3c8608338fe5d9e 100644
(file)
--- a/
lib/IR/LLVMContextImpl.h
+++ b/
lib/IR/LLVMContextImpl.h
@@
-104,9
+104,8
@@
struct AnonStructTypeKeyInfo {
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;