From 31da39e479056edc843b2f9d757dc200eed7797a Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 10 Mar 2014 08:08:59 +0000 Subject: [PATCH] [LCG] Make this call graph a fully regular type by giving it assignment as well. I don't see any particular need but it imposes no cost to support it and it makes the API cleaner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203448 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/LazyCallGraph.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/Analysis/LazyCallGraph.h b/include/llvm/Analysis/LazyCallGraph.h index 6b93bb26a89..74b0c8e9184 100644 --- a/include/llvm/Analysis/LazyCallGraph.h +++ b/include/llvm/Analysis/LazyCallGraph.h @@ -192,6 +192,12 @@ public: /// Any other operation on G is likely to fail. LazyCallGraph(LazyCallGraph &&G); + /// \brief Copy and move assignment. + LazyCallGraph &operator=(LazyCallGraph RHS) { + std::swap(*this, RHS); + return *this; + } + iterator begin() { return iterator(*this, EntryNodes); } iterator end() { return iterator(*this, EntryNodes, iterator::IsAtEndT()); }