[llvm] r203448 - [LCG] Make this call graph a fully regular type by giving it assignment
Chandler Carruth
chandlerc at gmail.com
Mon Mar 10 01:08:59 PDT 2014
Author: chandlerc
Date: Mon Mar 10 03:08:59 2014
New Revision: 203448
URL: http://llvm.org/viewvc/llvm-project?rev=203448&view=rev
Log:
[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.
Modified:
llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
Modified: llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LazyCallGraph.h?rev=203448&r1=203447&r2=203448&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LazyCallGraph.h (original)
+++ llvm/trunk/include/llvm/Analysis/LazyCallGraph.h Mon Mar 10 03:08:59 2014
@@ -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()); }
More information about the llvm-commits
mailing list