Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1362,10 +1362,10 @@ void AddressSanitizer::instrumentMemIntrinsic(MemIntrinsic *MI,

/// Check if we want (and can) handle this alloca.
bool AddressSanitizer::isInterestingAlloca(const AllocaInst &AI) {
auto PreviouslySeenAllocaInfo = ProcessedAllocas.find(&AI);
auto [It, Inserted] = ProcessedAllocas.try_emplace(&AI);

if (PreviouslySeenAllocaInfo != ProcessedAllocas.end())
return PreviouslySeenAllocaInfo->getSecond();
if (!Inserted)
return It->getSecond();

bool IsInteresting =
(AI.getAllocatedType()->isSized() &&
Expand All @@ -1382,7 +1382,7 @@ bool AddressSanitizer::isInterestingAlloca(const AllocaInst &AI) {
// safe allocas are not interesting
!(SSGI && SSGI->isSafe(AI)));

ProcessedAllocas[&AI] = IsInteresting;
It->second = IsInteresting;
return IsInteresting;
}

Expand Down
Loading