[llvm] r205122 - [PBQP] Move invalid graph nodeId/edgeId methods into base class.

Lang Hames lhames at gmail.com
Sat Mar 29 20:47:01 PDT 2014


Author: lhames
Date: Sat Mar 29 22:47:00 2014
New Revision: 205122

URL: http://llvm.org/viewvc/llvm-project?rev=205122&view=rev
Log:
[PBQP] Move invalid graph nodeId/edgeId methods into base class.

Modified:
    llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h

Modified: llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h?rev=205122&r1=205121&r2=205122&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h (original)
+++ llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h Sat Mar 29 22:47:00 2014
@@ -28,6 +28,16 @@ namespace PBQP {
   public:
     typedef unsigned NodeId;
     typedef unsigned EdgeId;
+
+    /// \brief Returns a value representing an invalid (non-existant) node.
+    static NodeId invalidNodeId() {
+      return std::numeric_limits<NodeId>::max();
+    }
+
+    /// \brief Returns a value representing an invalid (non-existant) edge.
+    static EdgeId invalidEdgeId() {
+      return std::numeric_limits<EdgeId>::max();
+    }
   };
 
   /// PBQP Graph class.
@@ -466,16 +476,6 @@ namespace PBQP {
       return E.getN1Id();
     }
 
-    /// \brief Returns a value representing an invalid (non-existant) node.
-    static NodeId invalidNodeId() {
-      return std::numeric_limits<NodeId>::max();
-    }
-
-    /// \brief Returns a value representing an invalid (non-existant) edge.
-    static EdgeId invalidEdgeId() {
-      return std::numeric_limits<EdgeId>::max();
-    }
-
     /// \brief Get the edge connecting two nodes.
     /// @param N1Id First node id.
     /// @param N2Id Second node id.





More information about the llvm-commits mailing list