From 6c25ca87a0a8295963e40da716a3a516f4baa325 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. llvm-svn: 203448 --- llvm/include/llvm/Analysis/LazyCallGraph.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h index 6b93bb26a89d..74b0c8e9184c 100644 --- a/llvm/include/llvm/Analysis/LazyCallGraph.h +++ b/llvm/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()); }