summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-05-14 10:56:19 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-05-14 10:56:19 +0000
commited31ca4bdcb17a5a5680bd54011826b100e17265 (patch)
tree9ee1ed8c817794b5205ff56683888f380b24d13a /llvm/lib/Transforms
parent301a2d9249b61510f827ffb9413b08845fff1121 (diff)
downloadbcm5719-llvm-ed31ca4bdcb17a5a5680bd54011826b100e17265.tar.gz
bcm5719-llvm-ed31ca4bdcb17a5a5680bd54011826b100e17265.zip
[asan] Fix compiler warnings.
llvm-svn: 208769
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index c52b8ecc4e4..291ad2ed47e 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/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)),
OpenPOWER on IntegriCloud