|
22 | 22 | #ifndef SWIFT_SIL_PROJECTION_H
|
23 | 23 | #define SWIFT_SIL_PROJECTION_H
|
24 | 24 |
|
| 25 | +#include "swift/AST/TypeAlignments.h" |
25 | 26 | #include "swift/Basic/NullablePtr.h"
|
26 | 27 | #include "swift/Basic/PointerIntEnum.h"
|
27 |
| -#include "swift/AST/TypeAlignments.h" |
28 |
| -#include "swift/SIL/SILValue.h" |
| 28 | +#include "swift/Basic/STLExtras.h" |
29 | 29 | #include "swift/SIL/SILInstruction.h"
|
| 30 | +#include "swift/SIL/SILValue.h" |
30 | 31 | #include "swift/SILOptimizer/Analysis/ARCAnalysis.h"
|
31 | 32 | #include "swift/SILOptimizer/Analysis/RCIdentityAnalysis.h"
|
32 | 33 | #include "llvm/ADT/Hashing.h"
|
@@ -751,18 +752,18 @@ class ProjectionTreeNode {
|
751 | 752 | ~ProjectionTreeNode() = default;
|
752 | 753 | ProjectionTreeNode(const ProjectionTreeNode &) = default;
|
753 | 754 |
|
754 |
| - llvm::ArrayRef<unsigned> getChildProjections() { |
755 |
| - return llvm::makeArrayRef(ChildProjections); |
| 755 | + bool isLeaf() const { return ChildProjections.empty(); } |
| 756 | + |
| 757 | + ArrayRef<unsigned> getChildProjections() const { |
| 758 | + return llvm::makeArrayRef(ChildProjections); |
756 | 759 | }
|
757 | 760 |
|
758 |
| - llvm::Optional<Projection> &getProjection() { return Proj; } |
| 761 | + Optional<Projection> &getProjection() { return Proj; } |
759 | 762 |
|
760 | 763 | const ArrayRef<Operand *> getNonProjUsers() const {
|
761 | 764 | return llvm::makeArrayRef(NonProjUsers);
|
762 | 765 | }
|
763 | 766 |
|
764 |
| - bool isLeaf() const { return ChildProjections.empty(); } |
765 |
| - |
766 | 767 | SILType getType() const { return NodeType; }
|
767 | 768 |
|
768 | 769 | bool isRoot() const {
|
|
0 commit comments