[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 02:43:51 PST 2025


================
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty,
     Alloca =
         new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(),
                              ArraySize, Name, AllocaInsertPt->getIterator());
+  if (Alloca->getName() != Name.str() &&
----------------
gbMattN wrote:

I think they want the `Alloca->getName() != Name.str()` check removed, so that when running ASan, we emit this name metadata on every `AllocaInst`
I thought it would be nice to reduce the amount of additional metadata emitted, but I don't have particularly strong feelings on the matter

https://github.com/llvm/llvm-project/pull/119387


More information about the llvm-commits mailing list