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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2016-04-08 19:01:38 +00:00
parent 99206081cf
commit 6900b64393

View File

@ -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;
}