mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 14:16:12 +00:00
Fix the crash on SimplifyLibCalls/2005-05-20-sprintf-crash.ll
llvm-svn: 52295
This commit is contained in:
parent
09554fd076
commit
ac4fe3f51c
@ -128,7 +128,7 @@ Value *LibCallOptimization::EmitStrLen(Value *Ptr, IRBuilder &B) {
|
||||
Value *LibCallOptimization::EmitMemCpy(Value *Dst, Value *Src, Value *Len,
|
||||
unsigned Align, IRBuilder &B) {
|
||||
Module *M = Caller->getParent();
|
||||
Intrinsic::ID IID = TD->getIntPtrType() == Type::Int32Ty ?
|
||||
Intrinsic::ID IID = Len->getType() == Type::Int32Ty ?
|
||||
Intrinsic::memcpy_i32 : Intrinsic::memcpy_i64;
|
||||
Value *MemCpy = Intrinsic::getDeclaration(M, IID);
|
||||
return B.CreateCall4(MemCpy, CastToCStr(Dst, B), CastToCStr(Src, B), Len,
|
||||
|
Loading…
x
Reference in New Issue
Block a user