Lines Matching refs:SGV
616 bool ModuleLinker::linkGlobalProto(GlobalVariable *SGV) { in linkGlobalProto() argument
617 GlobalValue *DGV = getLinkedToGlobal(SGV); in linkGlobalProto()
621 if (DGV->hasAppendingLinkage() || SGV->hasAppendingLinkage()) in linkGlobalProto()
622 return linkAppendingVarProto(cast<GlobalVariable>(DGV), SGV); in linkGlobalProto()
628 if (getLinkageResult(DGV, SGV, NewLinkage, LinkFromSrc)) in linkGlobalProto()
636 if (DGVar->isDeclaration() && SGV->isConstant() && !DGVar->isConstant()) in linkGlobalProto()
643 ValueMap[SGV] = ConstantExpr::getBitCast(DGV,TypeMap.get(SGV->getType())); in linkGlobalProto()
647 DoNotLinkFromSource.insert(SGV); in linkGlobalProto()
657 new GlobalVariable(*DstM, TypeMap.get(SGV->getType()->getElementType()), in linkGlobalProto()
658 SGV->isConstant(), SGV->getLinkage(), /*init*/0, in linkGlobalProto()
659 SGV->getName(), /*insertbefore*/0, in linkGlobalProto()
660 SGV->isThreadLocal(), in linkGlobalProto()
661 SGV->getType()->getAddressSpace()); in linkGlobalProto()
663 CopyGVAttributes(NewDGV, SGV); in linkGlobalProto()
671 ValueMap[SGV] = NewDGV; in linkGlobalProto()