diff --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h --- a/llvm/include/llvm/ADT/IntervalMap.h +++ b/llvm/include/llvm/ADT/IntervalMap.h @@ -1042,6 +1042,16 @@ new(&rootLeaf()) RootLeaf(); } + IntervalMap(const IntervalMap &Other) + : height(Other.height), rootSize(Other.rootSize), + allocator(Other.allocator) { + if (Other.branched()) { + new (&rootBranchData()) RootBranchData(Other.rootBranchData()); + } else { + new (&rootLeaf()) RootLeaf(Other.rootLeaf()); + } + } + ~IntervalMap() { clear(); rootLeaf().~RootLeaf();