[ThinLTO] Rename variables used in metadata linking (NFC)
[oota-llvm.git] / lib / Transforms / Utils / ValueMapper.cpp
index 1add78e01657ff8a2277451a103f1fb8887348fd..2e361d38ed0b6627c3772f647a5b4baab31d6adc 100644 (file)
@@ -218,12 +218,12 @@ static Metadata *mapMetadataOp(Metadata *Op,
 }
 
 /// Resolve uniquing cycles involving the given metadata.
-static void resolveCycles(Metadata *MD, bool MDMaterialized) {
+static void resolveCycles(Metadata *MD, bool AllowTemps) {
   if (auto *N = dyn_cast_or_null<MDNode>(MD)) {
-    if (!MDMaterialized && N->isTemporary())
+    if (AllowTemps && N->isTemporary())
       return;
     if (!N->isResolved())
-      N->resolveCycles(MDMaterialized);
+      N->resolveCycles(AllowTemps);
   }
 }
 
@@ -253,7 +253,7 @@ static bool remapOperands(MDNode &Node,
       // Resolve uniquing cycles underneath distinct nodes on the fly so they
       // don't infect later operands.
       if (IsDistinct)
-        resolveCycles(New, !(Flags & RF_HaveUnmaterializedMetadata));
+        resolveCycles(New, Flags & RF_HaveUnmaterializedMetadata);
     }
   }
 
@@ -401,7 +401,7 @@ Metadata *llvm::MapMetadata(const Metadata *MD, ValueToValueMapTy &VM,
     return NewMD;
 
   // Resolve cycles involving the entry metadata.
-  resolveCycles(NewMD, !(Flags & RF_HaveUnmaterializedMetadata));
+  resolveCycles(NewMD, Flags & RF_HaveUnmaterializedMetadata);
 
   // Remap the operands of distinct MDNodes.
   while (!DistinctWorklist.empty())