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 | 5af344d79d33fc5844a27e54a256b566d7017d36 (patch) | |
tree | d3c34a694b9c66f551edfc02e6958bec76b3a110 /lib/Analysis/DataStructure/Local.cpp | |
parent | 7a0b5bb7ab8ca2fa1089f1a217ea2643dc3e19af (diff) |
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
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 456eb2f333..0d6046d13d 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/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)); + } } |