diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-02 00:36:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-02 00:36:03 +0000 |
commit | 63ba1aca7ce0bf4f47f2ecfce035bc65ef1c0f65 (patch) | |
tree | 5d4d6801a468010fe681f5492663ad3abc7be56b /llvm/lib/Analysis/DataStructure/Local.cpp | |
parent | 364e6e82fd6c405c237efd7a20e94f2274eab6c5 (diff) | |
download | bcm5719-llvm-63ba1aca7ce0bf4f47f2ecfce035bc65ef1c0f65.tar.gz bcm5719-llvm-63ba1aca7ce0bf4f47f2ecfce035bc65ef1c0f65.zip |
Implement the "unknown flag" which mainly consists of aligning printing code
llvm-svn: 4490
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Local.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
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)); + } } |