[llvm-commits] [llvm] r54130 - /llvm/trunk/include/llvm/Support/GraphWriter.h

Dan Gohman gohman at apple.com
Sun Jul 27 16:12:19 PDT 2008


Author: djg
Date: Sun Jul 27 18:12:19 2008
New Revision: 54130

URL: http://llvm.org/viewvc/llvm-project?rev=54130&view=rev
Log:
Don't use reinterpret_cast when it isn't needed.

Modified:
    llvm/trunk/include/llvm/Support/GraphWriter.h

Modified: llvm/trunk/include/llvm/Support/GraphWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GraphWriter.h?rev=54130&r1=54129&r2=54130&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/GraphWriter.h (original)
+++ llvm/trunk/include/llvm/Support/GraphWriter.h Sun Jul 27 18:12:19 2008
@@ -125,7 +125,7 @@
   void writeNode(NodeType *Node) {
     std::string NodeAttributes = DOTTraits::getNodeAttributes(Node, G);
 
-    O << "\tNode" << reinterpret_cast<const void*>(Node) << " [shape=record,";
+    O << "\tNode" << static_cast<const void*>(Node) << " [shape=record,";
     if (!NodeAttributes.empty()) O << NodeAttributes << ",";
     O << "label=\"{";
 
@@ -199,8 +199,8 @@
         DestPort = static_cast<int>(Offset);
       }
 
-      emitEdge(reinterpret_cast<const void*>(Node), edgeidx,
-               reinterpret_cast<const void*>(TargetNode), DestPort,
+      emitEdge(static_cast<const void*>(Node), edgeidx,
+               static_cast<const void*>(TargetNode), DestPort,
                DOTTraits::getEdgeAttributes(Node, EI));
     }
   }
@@ -238,7 +238,7 @@
     O << "\tNode" << SrcNodeID;
     if (SrcNodePort >= 0)
       O << ":s" << SrcNodePort;
-    O << " -> Node" << reinterpret_cast<const void*>(DestNodeID);
+    O << " -> Node" << DestNodeID;
     if (DestNodePort >= 0)
       O << ":d" << DestNodePort;
 





More information about the llvm-commits mailing list