don't assume that the argument passed to fprintf("%s" is a string. This

fixes a crash in opt on 433.milc.

llvm-svn: 50023
This commit is contained in:
Chris Lattner 2008-04-21 03:18:33 +00:00
parent f6236cc2e9
commit ad0d42ba15
1 changed files with 1 additions and 1 deletions

View File

@ -1390,7 +1390,7 @@ public:
// If the result of the fprintf call is used, we can't do this.
// TODO: we should insert a strlen call.
if (!CI->use_empty())
if (!CI->use_empty() || !isa<PointerType>(CI->getOperand(3)->getType()))
return false;
// fprintf(file,"%s",str) -> fputs(str,file)