diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-05-14 10:56:19 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-05-14 10:56:19 +0000 |
commit | 54952a3d0a4fd7944a0e41020b7a187a6bd5285a (patch) | |
tree | e9d0dbae36f98e17d1de6e3703bd3d65709ca300 /lib/Transforms | |
parent | eb949e0d19e25e622263218db9d917b3e14a3ea2 (diff) |
[asan] Fix compiler warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Instrumentation/AddressSanitizer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index c52b8ecc4e4..291ad2ed47e 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -606,15 +606,14 @@ Value *AddressSanitizer::memToShadow(Value *Shadow, IRBuilder<> &IRB) { // Instrument memset/memmove/memcpy void AddressSanitizer::instrumentMemIntrinsic(MemIntrinsic *MI) { IRBuilder<> IRB(MI); - Instruction *Call = nullptr; if (isa<MemTransferInst>(MI)) { - Call = IRB.CreateCall3( + IRB.CreateCall3( isa<MemMoveInst>(MI) ? AsanMemmove : AsanMemcpy, IRB.CreatePointerCast(MI->getOperand(0), IRB.getInt8PtrTy()), IRB.CreatePointerCast(MI->getOperand(1), IRB.getInt8PtrTy()), IRB.CreateIntCast(MI->getOperand(2), IntptrTy, false)); } else if (isa<MemSetInst>(MI)) { - Call = IRB.CreateCall3( + IRB.CreateCall3( AsanMemset, IRB.CreatePointerCast(MI->getOperand(0), IRB.getInt8PtrTy()), IRB.CreateIntCast(MI->getOperand(1), IRB.getInt32Ty(), false), @@ -740,8 +739,7 @@ void AddressSanitizer::instrumentMop(Instruction *I, bool UseCalls) { Value *Size = ConstantInt::get(IntptrTy, TypeSize / 8); Value *AddrLong = IRB.CreatePointerCast(Addr, IntptrTy); if (UseCalls) { - CallInst *Check = - IRB.CreateCall2(AsanMemoryAccessCallbackSized[IsWrite], AddrLong, Size); + IRB.CreateCall2(AsanMemoryAccessCallbackSized[IsWrite], AddrLong, Size); } else { Value *LastByte = IRB.CreateIntToPtr( IRB.CreateAdd(AddrLong, ConstantInt::get(IntptrTy, TypeSize / 8 - 1)), |