[llvm] r310173 - [LCG] Fold otherwise unused variable into assert.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 5 01:28:48 PDT 2017


Author: d0k
Date: Sat Aug  5 01:28:48 2017
New Revision: 310173

URL: http://llvm.org/viewvc/llvm-project?rev=310173&view=rev
Log:
[LCG] Fold otherwise unused variable into assert.

No functionality change intended.

Modified:
    llvm/trunk/lib/Analysis/LazyCallGraph.cpp

Modified: llvm/trunk/lib/Analysis/LazyCallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyCallGraph.cpp?rev=310173&r1=310172&r2=310173&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyCallGraph.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyCallGraph.cpp Sat Aug  5 01:28:48 2017
@@ -1077,9 +1077,8 @@ LazyCallGraph::RefSCC::insertIncomingRef
 void LazyCallGraph::RefSCC::removeOutgoingEdge(Node &SourceN, Node &TargetN) {
   assert(G->lookupRefSCC(SourceN) == this &&
          "The source must be a member of this RefSCC.");
-
-  RefSCC &TargetRC = *G->lookupRefSCC(TargetN);
-  assert(&TargetRC != this && "The target must not be a member of this RefSCC");
+  assert(G->lookupRefSCC(TargetN) != this &&
+         "The target must not be a member of this RefSCC");
 
 #ifndef NDEBUG
   // In a debug build, verify the RefSCC is valid to start with and when this




More information about the llvm-commits mailing list