diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2010-05-31 06:16:35 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2010-05-31 06:16:35 +0000 |
| commit | 680e1e0ae35b33a6581f1c8a3a951d0180daf6f8 (patch) | |
| tree | 8fb25de71a61f4dfc9b455e1edcf93ec3c6d328c /lib/Transforms/Utils | |
| parent | 7d2325fdbbbfe925bbaebfbcca6faae7619f3d02 (diff) | |
| download | external_llvm-680e1e0ae35b33a6581f1c8a3a951d0180daf6f8.zip external_llvm-680e1e0ae35b33a6581f1c8a3a951d0180daf6f8.tar.gz external_llvm-680e1e0ae35b33a6581f1c8a3a951d0180daf6f8.tar.bz2 | |
The memcpy intrinsic only takes i8* for %src and %dst, so cast them to that
first. Fixes PR7265.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105206 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
| -rw-r--r-- | lib/Transforms/Utils/BuildLibCalls.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/BuildLibCalls.cpp b/lib/Transforms/Utils/BuildLibCalls.cpp index 767fa3a..059aeab 100644 --- a/lib/Transforms/Utils/BuildLibCalls.cpp +++ b/lib/Transforms/Utils/BuildLibCalls.cpp @@ -112,10 +112,10 @@ Value *llvm::EmitStrNCpy(Value *Dst, Value *Src, Value *Len, Value *llvm::EmitMemCpy(Value *Dst, Value *Src, Value *Len, unsigned Align, bool isVolatile, IRBuilder<> &B, const TargetData *TD) { Module *M = B.GetInsertBlock()->getParent()->getParent(); - const Type *ArgTys[3] = { Dst->getType(), Src->getType(), Len->getType() }; - Value *MemCpy = Intrinsic::getDeclaration(M, Intrinsic::memcpy, ArgTys, 3); Dst = CastToCStr(Dst, B); Src = CastToCStr(Src, B); + const Type *ArgTys[3] = { Dst->getType(), Src->getType(), Len->getType() }; + Value *MemCpy = Intrinsic::getDeclaration(M, Intrinsic::memcpy, ArgTys, 3); return B.CreateCall5(MemCpy, Dst, Src, Len, ConstantInt::get(B.getInt32Ty(), Align), ConstantInt::get(B.getInt1Ty(), isVolatile)); |
