Implement the "unknown flag" which mainly consists of aligning printing code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4490 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 456eb2f..0d6046d 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -369,12 +369,17 @@
 
 /// Handle casts...
 void GraphBuilder::visitCastInst(CastInst &CI) {
-  if (isPointerType(CI.getType())) {
-    if (isPointerType(CI.getOperand(0)->getType()))
+  if (isPointerType(CI.getType()))
+    if (isPointerType(CI.getOperand(0)->getType())) {
+      // Cast one pointer to the other, just act like a copy instruction
       setDestTo(CI, getValueDest(*CI.getOperand(0)));
-    else
-      ; // FIXME: "Other" node
-  }
+    } else {
+      // Cast something (floating point, small integer) to a pointer.  We need
+      // to track the fact that the node points to SOMETHING, just something we
+      // don't know about.  Make an "Unknown" node.
+      //
+      setDestTo(CI, createNode(DSNode::UnknownNode));
+    }
 }