diff options
-rw-r--r-- | lib/Transforms/IPO/SimplifyLibCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index 6e4ac5ae4a..10393bc3c6 100644 --- a/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp @@ -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) |