mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 20:20:03 +00:00
Fix some logic I broke that caused a regression on
SimplifyLibCalls/2005-05-20-sprintf-crash.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5931c54e85
commit
aebac50e77
@ -1500,9 +1500,11 @@ public:
|
||||
new CallInst(memcpy_func, args, "", ci);
|
||||
|
||||
// The strlen result is the unincremented number of bytes in the string.
|
||||
if (!ci->use_empty() && Len->getType() != ci->getType())
|
||||
Len = new CastInst(Len, ci->getType(), Len->getName(), ci);
|
||||
ci->replaceAllUsesWith(Len);
|
||||
if (!ci->use_empty()) {
|
||||
if (Len->getType() != ci->getType())
|
||||
Len = new CastInst(Len, ci->getType(), Len->getName(), ci);
|
||||
ci->replaceAllUsesWith(Len);
|
||||
}
|
||||
ci->eraseFromParent();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user