[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 05:42:58 PST 2025
================
@@ -3391,6 +3391,27 @@ static void findStoresToUninstrumentedArgAllocas(
}
}
+StringRef getAllocaName(AllocaInst *AI) {
+ // Alloca could have been renamed for uniqueness. Its true name will have been
+ // recorded as an annotation.
+ if (AI->hasMetadata(LLVMContext::MD_annotation)) {
+ MDTuple *Annotation =
+ (MDTuple *)AI->getMetadata(LLVMContext::MD_annotation);
+ for (int i = 0; i < Annotation->getNumOperands(); i++) {
----------------
fhahn wrote:
Can we directly iterate over the operands?
https://github.com/llvm/llvm-project/pull/119387
More information about the llvm-commits
mailing list