Use references in DF iterators. This eliminates copy-ctor calls on huge objects ...
[oota-llvm.git] / include / llvm / ADT / GraphTraits.h
index 2d56064a89e3d59ab9b5d8d1fdfdb789de00bdbe..2b3a78b336c30e30214422e0fa033acddb226481 100644 (file)
@@ -73,9 +73,9 @@ struct GraphTraits {
 //
 template <class GraphType>
 struct Inverse {
-  GraphType &Graph;
+  const GraphType &Graph;
 
-  inline Inverse(GraphType &G) : Graph(G) {}
+  inline Inverse(const GraphType &G) : Graph(G) {}
 };
 
 // Provide a partial specialization of GraphTraits so that the inverse of an inverse