[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 14:30:49 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() &&
----------------
efriedma-quic wrote:
Oh, we have some code that specifically messes with the default when asan is enabled. https://github.com/llvm/llvm-project/blob/3caa68a021c2f795de3df7f6ad7953556e825fab/clang/lib/Frontend/CompilerInvocation.cpp#L4973
If we have to support metadata anyway, I'd prefer to use the metadata unconditionally, instead of messing with LLVM IR instruction names.
https://github.com/llvm/llvm-project/pull/119387
More information about the llvm-commits
mailing list