[llvm] r265831 - Linker: Always pass RF_IgnoreMissingLocals; NFC

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 12:01:38 PDT 2016


Author: dexonsmith
Date: Fri Apr  8 14:01:38 2016
New Revision: 265831

URL: http://llvm.org/viewvc/llvm-project?rev=265831&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Linker/IRMover.cpp

Modified: llvm/trunk/lib/Linker/IRMover.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/IRMover.cpp?rev=265831&r1=265830&r2=265831&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/IRMover.cpp (original)
+++ llvm/trunk/lib/Linker/IRMover.cpp Fri Apr  8 14:01:38 2016
@@ -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
     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;
 }




More information about the llvm-commits mailing list