Lines Matching defs:DGV
469 GlobalValue *DGV = DstM.getNamedValue(SrcGV->getName());
470 if (!DGV)
475 if (DGV->hasLocalLinkage())
480 if (auto *FDGV = dyn_cast<Function>(DGV))
487 return DGV;
496 /// GlobalValue \p DGV (if any), return true if the linker will pull \p SGV
500 bool shouldLink(GlobalValue *DGV, GlobalValue &SGV);
792 GlobalValue *DGV = getLinkedToGlobal(&SGV);
793 if (!DGV)
796 if (!DGV->hasAppendingLinkage() || !SGV.hasAppendingLinkage()) {
797 TypeMap.addTypeMapping(DGV->getType(), SGV.getType());
802 ArrayType *DAT = cast<ArrayType>(DGV->getValueType());
808 if (GlobalValue *DGV = getLinkedToGlobal(&SGV)) {
809 if (DGV->getType() == SGV.getType()) {
810 // If the types of DGV and SGV are the same, it means that DGV is from
818 TypeMap.addTypeMapping(DGV->getType(), SGV.getType());
822 if (GlobalValue *DGV = getLinkedToGlobal(&SGV))
823 TypeMap.addTypeMapping(DGV->getType(), SGV.getType());
968 GlobalValue *DGV = getLinkedToGlobal(Key);
969 return !shouldLink(DGV, *Key);
1000 bool IRLinker::shouldLink(GlobalValue *DGV, GlobalValue &SGV) {
1004 if (DGV && !DGV->isDeclarationForLinker())
1023 GlobalValue *DGV = getLinkedToGlobal(SGV);
1025 bool ShouldLink = shouldLink(DGV, *SGV);
1039 DGV = nullptr;
1042 if (SGV->hasAppendingLinkage() || (DGV && DGV->hasAppendingLinkage()))
1043 return linkAppendingVarProto(cast_or_null<GlobalVariable>(DGV),
1048 if (DGV && !ShouldLink) {
1049 NewGV = DGV;
1096 // the same as DGV and NewGV, and TypeMap.get() will assert since it
1098 if (DGV && NewGV != SGV) {
1103 if (DGV && NewGV != DGV) {
1108 DGV,
1109 ConstantExpr::getPointerBitCastOrAddrSpaceCast(NewGV, DGV->getType())));