From 63ba1aca7ce0bf4f47f2ecfce035bc65ef1c0f65 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 2 Nov 2002 00:36:03 +0000 Subject: Implement the "unknown flag" which mainly consists of aligning printing code llvm-svn: 4490 --- llvm/lib/Analysis/DataStructure/Local.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp') diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index 456eb2f3335..0d6046d13d3 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/lib/Analysis/DataStructure/Local.cpp @@ -369,12 +369,17 @@ void GraphBuilder::visitCallInst(CallInst &CI) { /// 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)); + } } -- cgit v1.2.3