Skip to content

Commit 0121314

Browse files
committed
[MemoryTaggingSupport] Remove unnecessary bitcast (NFC)
As the comment indicates, this is no longer necessary with opaque pointers.
1 parent 0c75e09 commit 0121314

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,7 @@ void alignAndPadAlloca(memtag::AllocaInfo &Info, llvm::Align Alignment) {
232232
NewAI->setSwiftError(Info.AI->isSwiftError());
233233
NewAI->copyMetadata(*Info.AI);
234234

235-
Value *NewPtr = NewAI;
236-
237-
// TODO: Remove when typed pointers dropped
238-
if (Info.AI->getType() != NewAI->getType())
239-
NewPtr = new BitCastInst(NewAI, Info.AI->getType(), "", Info.AI->getIterator());
240-
241-
Info.AI->replaceAllUsesWith(NewPtr);
235+
Info.AI->replaceAllUsesWith(NewAI);
242236
Info.AI->eraseFromParent();
243237
Info.AI = NewAI;
244238
}

0 commit comments

Comments
 (0)