[CallGraphUpdater][NFC] Minor updates to D77855
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 9 Apr 2020 20:43:31 +0000 (15:43 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 16 Apr 2020 02:26:35 +0000 (21:26 -0500)
I uploaded the old version accidentally instead of the one with these
minor adjustments requested by the reviewers.

Differential Revision: https://reviews.llvm.org/D77855

llvm/lib/Analysis/CallGraphSCCPass.cpp
llvm/lib/Transforms/Utils/CallGraphUpdater.cpp

index 8a222a6..79fa372 100644 (file)
@@ -563,7 +563,7 @@ void CallGraphSCC::ReplaceNode(CallGraphNode *Old, CallGraphNode *New) {
 }
 
 void CallGraphSCC::DeleteNode(CallGraphNode *Old) {
-  ReplaceNode(Old, /* New */ nullptr);
+  ReplaceNode(Old, /*New=*/nullptr);
 }
 
 //===----------------------------------------------------------------------===//
index 219c46d..8cdf01e 100644 (file)
@@ -112,7 +112,7 @@ void CallGraphUpdater::removeFunction(Function &DeadFn) {
     DeadFunctions.push_back(&DeadFn);
 
   // For the old call graph we remove the function from the SCC right away.
-  if (CGSCC && !ReplacedFunctions.count(&DeadFn))
+  if (CG && !ReplacedFunctions.count(&DeadFn))
     CGSCC->DeleteNode((*CG)[&DeadFn]);
 }