================ @@ -38,13 +39,21 @@ class BitVector; class EdgeBundles; class MachineBlockFrequencyInfo; class MachineFunction; +class SpillPlacementWrapperLegacy; +class SpillPlacementAnalysis; + +class SpillPlacement { + friend class SpillPlacementWrapperLegacy; + friend class SpillPlacementAnalysis; -class SpillPlacement : public MachineFunctionPass { struct Node; + const MachineFunction *MF = nullptr; const EdgeBundles *bundles = nullptr; const MachineBlockFrequencyInfo *MBFI = nullptr; - Node *nodes = nullptr; + + static void arrayDeleter(Node *N); + std::unique_ptr<Node, decltype(&arrayDeleter)> nodes; ---------------- optimisan wrote:
The definition of `Node` is not available here, so the default deleter fails to compile sizeof(Node) for this incomplete type. To hack around it I put the definition of `arrayDeleter` in the implementation where struct Node is defined. But changing to `unique_ptr<Node[], theDeleter>` facilitates removal of `.get()` calls https://github.com/llvm/llvm-project/pull/116618 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits