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
This commit is contained in:
Chris Lattner
2002-11-02 00:36:03 +00:00
parent 7a0b5bb7ab
commit 5af344d79d
4 changed files with 33 additions and 25 deletions

View File

@ -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));
}
}