mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Fix the crash on SimplifyLibCalls/2005-05-20-sprintf-crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52295 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6520aa0f5e
commit
077707ccc0
@ -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