Lines Matching refs:SrcGV
367 GlobalValue *getLinkedToGlobal(GlobalValue *SrcGV) { in getLinkedToGlobal() argument
370 if (!SrcGV->hasName() || SrcGV->hasLocalLinkage()) in getLinkedToGlobal()
374 GlobalValue *DGV = DstM->getNamedValue(SrcGV->getName()); in getLinkedToGlobal()
388 bool linkAppendingVarProto(GlobalVariable *DstGV, GlobalVariable *SrcGV);
389 bool linkGlobalProto(GlobalVariable *SrcGV);
426 static void CopyGVAttributes(GlobalValue *DestGV, const GlobalValue *SrcGV) { in CopyGVAttributes() argument
428 unsigned Alignment = std::max(DestGV->getAlignment(), SrcGV->getAlignment()); in CopyGVAttributes()
429 DestGV->copyAttributesFrom(SrcGV); in CopyGVAttributes()
432 forceRenaming(DestGV, SrcGV->getName()); in CopyGVAttributes()
553 GlobalVariable *SrcGV) { in linkAppendingVarProto() argument
555 if (!SrcGV->hasAppendingLinkage() || !DstGV->hasAppendingLinkage()) in linkAppendingVarProto()
556 return emitError("Linking globals named '" + SrcGV->getName() + in linkAppendingVarProto()
561 cast<ArrayType>(TypeMap.get(SrcGV->getType()->getElementType())); in linkAppendingVarProto()
567 if (DstGV->isConstant() != SrcGV->isConstant()) in linkAppendingVarProto()
570 if (DstGV->getAlignment() != SrcGV->getAlignment()) in linkAppendingVarProto()
574 if (DstGV->getVisibility() != SrcGV->getVisibility()) in linkAppendingVarProto()
578 if (DstGV->getSection() != SrcGV->getSection()) in linkAppendingVarProto()
587 new GlobalVariable(*DstGV->getParent(), NewType, SrcGV->isConstant(), in linkAppendingVarProto()
598 AVI.SrcInit = SrcGV->getInitializer(); in linkAppendingVarProto()
603 ValueMap[SrcGV] = ConstantExpr::getBitCast(NG, TypeMap.get(SrcGV->getType())); in linkAppendingVarProto()
609 DoNotLinkFromSource.insert(SrcGV); in linkAppendingVarProto()