[GraphTraits] Make nodes_iterator dereference to NodeType*/NodeRef

Currently nodes_iterator may dereference to a NodeType* or a NodeType&. Make them all dereference to NodeType*, which is NodeRef later.

Differential Revision: https://reviews.llvm.org/D23704
Differential Revision: https://reviews.llvm.org/D23705

llvm-svn: 279326
diff --git a/llvm/unittests/Analysis/CallGraphTest.cpp b/llvm/unittests/Analysis/CallGraphTest.cpp
index af46291..0c92804 100644
--- a/llvm/unittests/Analysis/CallGraphTest.cpp
+++ b/llvm/unittests/Analysis/CallGraphTest.cpp
@@ -24,11 +24,11 @@
   auto X = ++I;
 
   // Should be able to iterate over all nodes of the graph.
-  static_assert(std::is_same<decltype(*I), NodeTy &>::value,
+  static_assert(std::is_same<decltype(*I), NodeTy *>::value,
                 "Node type does not match");
-  static_assert(std::is_same<decltype(*X), NodeTy &>::value,
+  static_assert(std::is_same<decltype(*X), NodeTy *>::value,
                 "Node type does not match");
-  static_assert(std::is_same<decltype(*E), NodeTy &>::value,
+  static_assert(std::is_same<decltype(*E), NodeTy *>::value,
                 "Node type does not match");
 
   NodeTy *N = GraphTraits<Ty *>::getEntryNode(G);