Add two missing returns, which caused us to be very pessimistic about the

printf and scanf families!

llvm-svn: 11683
This commit is contained in:
Chris Lattner 2004-02-20 23:27:09 +00:00
parent 0be72bef9f
commit 31f8fa66cb
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@
// or not a node is collapsed, etc. These are the command line arguments that
// it supports:
//
// --dsgc-dsapass={local,bu,td} - Specify what flavor of graph to check
// --dsgc-dspass={local,bu,td} - Specify what flavor of graph to check
// --dsgc-abort-if-any-collapsed - Abort if any collapsed nodes are found
// --dsgc-abort-if-collapsed=<list> - Abort if a node pointed to by an SSA
// value with name in <list> is collapsed

View File

@ -38,7 +38,6 @@ X("datastructure", "Local Data Structure Analysis");
static cl::opt<bool>
TrackIntegersAsPointers("dsa-track-integers",
cl::desc("If this is set, track integers as potential pointers"));
namespace llvm {
namespace DS {
@ -581,6 +580,7 @@ void GraphBuilder::visitCallSite(CallSite CS) {
if (DSNode *N = getValueDest(**AI).getNode())
N->setReadMarker();
}
return;
} else if (F->getName() == "scanf" || F->getName() == "fscanf" ||
F->getName() == "sscanf") {
CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end();
@ -612,6 +612,7 @@ void GraphBuilder::visitCallSite(CallSite CS) {
if (DSNode *N = getValueDest(**AI).getNode())
N->setModifiedMarker();
}
return;
} else if (F->getName() == "strtok") {
// strtok reads and writes the first argument, returning it. It reads
// its second arg. FIXME: strtok also modifies some hidden static