Lines Matching defs:Src

26 enum class LinkFrom { Dst, Src, Both };
36 /// For symbol clashes, prefer those from Src.
57 const GlobalValue &Src);
68 Comdat::SelectionKind Src,
152 Comdat::SelectionKind Src,
161 bool SrcAnyOrLargest = Src == Comdat::SelectionKind::Any ||
162 Src == Comdat::SelectionKind::Largest;
165 Src == Comdat::SelectionKind::Largest)
169 } else if (Src == Dst) {
203 From = SrcSize > DstSize ? LinkFrom::Src : LinkFrom::Dst;
230 From = LinkFrom::Src;
242 const GlobalValue &Src) {
244 // Should we unconditionally use the Src?
250 // We always have to add Src if it has appending linkage.
251 if (Src.hasAppendingLinkage() || Dest.hasAppendingLinkage()) {
256 bool SrcIsDeclaration = Src.isDeclarationForLinker();
260 // If Src is external or if both Src & Dest are external.. Just link the
262 if (Src.hasDLLImportStorageClass()) {
273 LinkFromSrc = !Src.isDeclaration() && Dest.isDeclaration();
278 // If Dest is external but Src is not:
283 if (Src.hasCommonLinkage()) {
296 uint64_t SrcSize = DL.getTypeAllocSize(Src.getValueType());
301 if (Src.isWeakForLinker()) {
305 if (Dest.hasLinkOnceLinkage() && Src.hasWeakLinkage()) {
315 assert(Src.hasExternalLinkage());
320 assert(!Src.hasExternalWeakLinkage());
322 assert(Dest.hasExternalLinkage() && Src.hasExternalLinkage() &&
324 return emitError("Linking globals named '" + Src.getName() +
480 if (From != LinkFrom::Src)
624 std::unique_ptr<Module> Src, unsigned Flags,
626 ModuleLinker ModLinker(Mover, std::move(Src), Flags,
641 Module &Dest, std::unique_ptr<Module> Src, unsigned Flags,
644 return L.linkInModule(std::move(Src), Flags, std::move(InternalizeCallback));
651 LLVMBool LLVMLinkModules2(LLVMModuleRef Dest, LLVMModuleRef Src) {
653 std::unique_ptr<Module> M(unwrap(Src));