diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-29 20:04:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-29 20:04:24 +0000 |
commit | 4dba2ee9745198536a3cd3caeccadb4b9b5b33e5 (patch) | |
tree | 143fb6d97ad34b4ee0deb11ef594a4b59fc244d0 /llvm/lib/Analysis | |
parent | 93d008990ee2b9659018d39325415eae9e6d08ad (diff) | |
download | bcm5719-llvm-4dba2ee9745198536a3cd3caeccadb4b9b5b33e5.tar.gz bcm5719-llvm-4dba2ee9745198536a3cd3caeccadb4b9b5b33e5.zip |
learn about some more functions.
llvm-svn: 20929
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/IPA/Andersens.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp index ed9d54953e1..9ed21e06908 100644 --- a/llvm/lib/Analysis/IPA/Andersens.cpp +++ b/llvm/lib/Analysis/IPA/Andersens.cpp @@ -612,11 +612,12 @@ bool Andersens::AddConstraintsForExternalCall(CallSite CS, Function *F) { // These functions don't induce any points-to constraints. if (F->getName() == "printf" || F->getName() == "fprintf" || F->getName() == "sprintf" || - F->getName() == "fgets" || + F->getName() == "fgets" || F->getName() == "__assert_fail" || F->getName() == "open" || F->getName() == "fopen" || F->getName() == "fclose" || F->getName() == "fflush" || F->getName() == "rewind" || - F->getName() == "atoi" || F->getName() == "unlink" || + F->getName() == "atoi" || F->getName() == "atol" || + F->getName() == "unlink" || F->getName() == "sscanf" || F->getName() == "fscanf" || F->getName() == "llvm.memset" || F->getName() == "memcmp" || F->getName() == "read" || F->getName() == "write") @@ -633,8 +634,10 @@ bool Andersens::AddConstraintsForExternalCall(CallSite CS, Function *F) { return true; } - if (F->getName() == "realloc") { - // Result = Arg + // Result = Arg0 + if (F->getName() == "realloc" || F->getName() == "strchr" || + F->getName() == "strrchr" || F->getName() == "strstr" || + F->getName() == "strtok") { Constraints.push_back(Constraint(Constraint::Copy, getNode(CS.getInstruction()), getNode(CS.getArgument(0)))); |