[llvm] r208769 - [asan] Fix compiler warnings.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Wed May 14 03:56:19 PDT 2014


Author: eugenis
Date: Wed May 14 05:56:19 2014
New Revision: 208769

URL: http://llvm.org/viewvc/llvm-project?rev=208769&view=rev
Log:
[asan] Fix compiler warnings.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=208769&r1=208768&r2=208769&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Wed May 14 05:56:19 2014
@@ -606,15 +606,14 @@ Value *AddressSanitizer::memToShadow(Val
 // 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(Ins
   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)),





More information about the llvm-commits mailing list