[llvm] [AddressSanitizer] Delete duplicate variable in AddresssSanitizer Pass (PR #102305)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 04:33:56 PDT 2024


https://github.com/int-zjt created https://github.com/llvm/llvm-project/pull/102305

A variable named AccessInfo was used in a condition code block, but it is declared both in and out of this condition code block.

>From 3ef8ed5aa7cbcfc996e89d98e923ba82af19e7e7 Mon Sep 17 00:00:00 2001
From: "zhangjiatong.0" <zhangjiatong.0 at bytedance.com>
Date: Wed, 7 Aug 2024 17:41:26 +0800
Subject: [PATCH] Delete duplicate variable in AddresssSanitizer Pass

---
 llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 9fb1df7ab2b79..0ff5e9b815adf 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -1847,7 +1847,6 @@ void AddressSanitizer::instrumentAddress(Instruction *OrigIns,
 
   InstrumentationIRBuilder IRB(InsertBefore);
   size_t AccessSizeIndex = TypeStoreSizeToSizeIndex(TypeStoreSize);
-  const ASanAccessInfo AccessInfo(IsWrite, CompileKernel, AccessSizeIndex);
 
   if (UseCalls && ClOptimizeCallbacks) {
     const ASanAccessInfo AccessInfo(IsWrite, CompileKernel, AccessSizeIndex);



More information about the llvm-commits mailing list