Skip to content

Commit b3529ed

Browse files
committed
[IRMover] Remove unnecessary pointer bitcast (NFC)
1 parent 12a3165 commit b3529ed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Linker/IRMover.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,8 +969,6 @@ IRLinker::linkAppendingVarProto(GlobalVariable *DstGV,
969969
NG->copyAttributesFrom(SrcGV);
970970
forceRenaming(NG, SrcGV->getName());
971971

972-
Constant *Ret = ConstantExpr::getBitCast(NG, TypeMap.get(SrcGV->getType()));
973-
974972
Mapper.scheduleMapAppendingVariable(
975973
*NG,
976974
(DstGV && !DstGV->isDeclaration()) ? DstGV->getInitializer() : nullptr,
@@ -982,7 +980,7 @@ IRLinker::linkAppendingVarProto(GlobalVariable *DstGV,
982980
RAUWWorklist.push_back(std::make_pair(DstGV, NG));
983981
}
984982

985-
return Ret;
983+
return NG;
986984
}
987985

988986
bool IRLinker::shouldLink(GlobalValue *DGV, GlobalValue &SGV) {

0 commit comments

Comments
 (0)