Skip to content

Commit 87b491a

Browse files
authored
[NFC] [MTE] get rid of unnecessary cast (#110336)
1 parent a8eb12c commit 87b491a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/AArch64/AArch64StackTagging.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,14 +580,14 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) {
580580
Instruction *Base =
581581
insertBaseTaggedPointer(*Fn.getParent(), SInfo.AllocasToInstrument, DT);
582582

583-
int NextTag = 0;
583+
unsigned int NextTag = 0;
584584
for (auto &I : SInfo.AllocasToInstrument) {
585585
memtag::AllocaInfo &Info = I.second;
586586
assert(Info.AI && SIB.getAllocaInterestingness(*Info.AI) ==
587587
llvm::memtag::AllocaInterestingness::kInteresting);
588588
memtag::alignAndPadAlloca(Info, kTagGranuleSize);
589589
AllocaInst *AI = Info.AI;
590-
int Tag = NextTag;
590+
unsigned int Tag = NextTag;
591591
NextTag = (NextTag + 1) % 16;
592592
// Replace alloca with tagp(alloca).
593593
IRBuilder<> IRB(Info.AI->getNextNode());
@@ -642,7 +642,7 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) {
642642
II->eraseFromParent();
643643
}
644644

645-
memtag::annotateDebugRecords(Info, static_cast<unsigned long>(Tag));
645+
memtag::annotateDebugRecords(Info, Tag);
646646
}
647647

648648
// If we have instrumented at least one alloca, all unrecognized lifetime

0 commit comments

Comments
 (0)