[LCG] Add a unittest for the LazyCallGraph. I had a weak moment and
[oota-llvm.git] / include / llvm / Analysis / LazyCallGraph.h
index 26eac3180d36b4348c1fd32920ba4f08b345d1f8..ecb2f1530e08e2e7531428a2218e1248d8716b16 100644 (file)
@@ -134,8 +134,8 @@ public:
         : G(&G), NI(Nodes.end()) {}
 
   public:
-    bool operator==(const iterator &Arg) { return NI == Arg.NI; }
-    bool operator!=(const iterator &Arg) { return !operator==(Arg); }
+    bool operator==(const iterator &Arg) const { return NI == Arg.NI; }
+    bool operator!=(const iterator &Arg) const { return !operator==(Arg); }
 
     reference operator*() const {
       if (NI->is<Node *>())
@@ -260,10 +260,10 @@ public:
         : G(&G), C(nullptr) {}
 
   public:
-    bool operator==(const postorder_scc_iterator &Arg) {
+    bool operator==(const postorder_scc_iterator &Arg) const {
       return G == Arg.G && C == Arg.C;
     }
-    bool operator!=(const postorder_scc_iterator &Arg) {
+    bool operator!=(const postorder_scc_iterator &Arg) const {
       return !operator==(Arg);
     }