@@ -835,10 +835,10 @@ class ProjectionTreeNode {
835835class ProjectionTree {
836836 friend class ProjectionTreeNode ;
837837
838- SILModule & Mod;
838+ SILModule * Mod;
839839
840840 // / The allocator we use to allocate ProjectionTreeNodes in the tree.
841- llvm::SpecificBumpPtrAllocator<ProjectionTreeNode> & Allocator;
841+ llvm::SpecificBumpPtrAllocator<ProjectionTreeNode> * Allocator;
842842
843843 // A common pattern is a 3 field struct.
844844 llvm::SmallVector<ProjectionTreeNode *, 4 > ProjectionTreeNodes;
@@ -854,7 +854,7 @@ class ProjectionTree {
854854 // / initialized by initializeWithExistingTree.
855855 ProjectionTree (SILModule &Mod,
856856 llvm::SpecificBumpPtrAllocator<ProjectionTreeNode> &Allocator)
857- : Mod(Mod), Allocator(Allocator) {}
857+ : Mod(& Mod), Allocator(& Allocator) {}
858858 ~ProjectionTree ();
859859 ProjectionTree (const ProjectionTree &) = delete ;
860860 ProjectionTree (ProjectionTree &&) = default ;
@@ -876,7 +876,7 @@ class ProjectionTree {
876876 LeafValueMapTy &LeafValues);
877877
878878 // / Return the module associated with this tree.
879- SILModule &getModule () const { return Mod; }
879+ SILModule &getModule () const { return * Mod; }
880880
881881 llvm::ArrayRef<ProjectionTreeNode *> getProjectionTreeNodes () {
882882 return llvm::makeArrayRef (ProjectionTreeNodes);
@@ -960,16 +960,16 @@ class ProjectionTree {
960960 void createRoot (SILType BaseTy) {
961961 assert (ProjectionTreeNodes.empty () &&
962962 " Should only create root when ProjectionTreeNodes is empty" );
963- auto *Node = new (Allocator. Allocate ()) ProjectionTreeNode (BaseTy);
963+ auto *Node = new (Allocator-> Allocate ()) ProjectionTreeNode (BaseTy);
964964 ProjectionTreeNodes.push_back (Node);
965965 }
966966
967967 ProjectionTreeNode *createChild (ProjectionTreeNode *Parent,
968968 SILType BaseTy,
969969 const Projection &P) {
970970 unsigned Index = ProjectionTreeNodes.size ();
971- auto *Node = new (Allocator. Allocate ()) ProjectionTreeNode (Parent, Index,
972- BaseTy, P);
971+ auto *Node = new (Allocator-> Allocate ()) ProjectionTreeNode (Parent, Index,
972+ BaseTy, P);
973973 ProjectionTreeNodes.push_back (Node);
974974 return ProjectionTreeNodes[Index];
975975 }
0 commit comments