mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
memcpy returns void!!!!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a8d451e1d4
commit
a525f6d8f5
@ -205,8 +205,7 @@ namespace {
|
|||||||
args.push_back(PointerType::get(Type::SByteTy));
|
args.push_back(PointerType::get(Type::SByteTy));
|
||||||
args.push_back(Type::IntTy);
|
args.push_back(Type::IntTy);
|
||||||
args.push_back(Type::IntTy);
|
args.push_back(Type::IntTy);
|
||||||
memcpy_type = FunctionType::get(
|
memcpy_type = FunctionType::get(Type::VoidTy, args, false);
|
||||||
PointerType::get(Type::SByteTy), args, false);
|
|
||||||
}
|
}
|
||||||
return memcpy_type;
|
return memcpy_type;
|
||||||
}
|
}
|
||||||
@ -568,10 +567,7 @@ public:
|
|||||||
switch (len)
|
switch (len)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
// Just replace with the destination parameter since a zero length
|
// The memcpy is a no-op so just dump its call.
|
||||||
// memcpy is a no-op.
|
|
||||||
ci->replaceAllUsesWith(
|
|
||||||
new CastInst(dest,PointerType::get(Type::VoidTy),"",ci));
|
|
||||||
ci->eraseFromParent();
|
ci->eraseFromParent();
|
||||||
return true;
|
return true;
|
||||||
case 1:
|
case 1:
|
||||||
@ -595,8 +591,6 @@ public:
|
|||||||
}
|
}
|
||||||
LoadInst* LI = new LoadInst(SrcCast,"",ci);
|
LoadInst* LI = new LoadInst(SrcCast,"",ci);
|
||||||
StoreInst* SI = new StoreInst(LI, DestCast, ci);
|
StoreInst* SI = new StoreInst(LI, DestCast, ci);
|
||||||
ci->replaceAllUsesWith(
|
|
||||||
new CastInst(dest,PointerType::get(Type::VoidTy),"",ci));
|
|
||||||
ci->eraseFromParent();
|
ci->eraseFromParent();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user