Skip to content

Commit

Permalink
[HWASan] [NFC] use auto* over auto& for pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
fmayer committed Sep 28, 2022
1 parent 4b27825 commit 979db53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llvm/lib/Target/AArch64/AArch64StackTagging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,14 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) {
uint64_t Size = *Info.AI->getAllocationSizeInBits(*DL) / 8;
Value *Ptr = IRB.CreatePointerCast(TagPCall, IRB.getInt8PtrTy());
tagAlloca(AI, &*IRB.GetInsertPoint(), Ptr, Size);
for (auto &RI : SInfo.RetVec) {
for (auto *RI : SInfo.RetVec) {
untagAlloca(AI, RI, Size);
}
// We may have inserted tag/untag outside of any lifetime interval.
// Remove all lifetime intrinsics for this alloca.
for (auto &II : Info.LifetimeStart)
for (auto *II : Info.LifetimeStart)
II->eraseFromParent();
for (auto &II : Info.LifetimeEnd)
for (auto *II : Info.LifetimeEnd)
II->eraseFromParent();
}

Expand All @@ -604,7 +604,7 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) {

// If we have instrumented at least one alloca, all unrecognized lifetime
// intrinsics have to go.
for (auto &I : SInfo.UnrecognizedLifetimes)
for (auto *I : SInfo.UnrecognizedLifetimes)
I->eraseFromParent();

return true;
Expand Down

0 comments on commit 979db53

Please sign in to comment.