From fe6583a0a66ca64125df0b6a59855bb08d9c6591 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 8 Apr 2016 19:01:38 +0000 Subject: [PATCH] Linker: Always pass RF_IgnoreMissingLocals; NFC This is a cleanup after clarifying the meaning of RF_IgnoreMissingLocals in r265628 and truly limiting it to locals in r265768. This should have no functionality change, since the only context that the flag has an effect is when we could hit function-local Value and Metadata, and we were already passing it in those contexts. llvm-svn: 265831 --- llvm/lib/Linker/IRMover.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp index 2958d96cbc76..3c27b82739f8 100644 --- a/llvm/lib/Linker/IRMover.cpp +++ b/llvm/lib/Linker/IRMover.cpp @@ -398,7 +398,7 @@ class IRLinker { bool HasError = false; /// Flags to pass to value mapper invocations. - RemapFlags ValueMapperFlags = RF_MoveDistinctMDs; + RemapFlags ValueMapperFlags = RF_MoveDistinctMDs | RF_IgnoreMissingLocals; /// Set of subprogram metadata that does not need to be linked into the /// destination module, because the functions were not imported directly @@ -997,8 +997,8 @@ bool IRLinker::linkFunctionBody(Function &Dst, Function &Src) { A.mutateType(TypeMap.get(A.getType())); for (BasicBlock &BB : Dst) for (Instruction &I : BB) - RemapInstruction(&I, ValueMap, RF_IgnoreMissingLocals | ValueMapperFlags, - &TypeMap, &GValMaterializer); + RemapInstruction(&I, ValueMap, ValueMapperFlags, &TypeMap, + &GValMaterializer); return false; }