[llvm] r310174 - [LCG] Remove yet another variable only used inside of asserts.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 5 01:33:16 PDT 2017


Author: chandlerc
Date: Sat Aug  5 01:33:16 2017
New Revision: 310174

URL: http://llvm.org/viewvc/llvm-project?rev=310174&view=rev
Log:
[LCG] Remove yet another variable only used inside of asserts.

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=310174&r1=310173&r2=310174&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyCallGraph.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyCallGraph.cpp Sat Aug  5 01:33:16 2017
@@ -917,10 +917,10 @@ void LazyCallGraph::RefSCC::insertOutgoi
 
   assert(G->lookupRefSCC(SourceN) == this && "Source must be in this RefSCC.");
 
-  RefSCC &TargetC = *G->lookupRefSCC(TargetN);
-  assert(&TargetC != this && "Target must not be in this RefSCC.");
+  assert(G->lookupRefSCC(TargetN) != this &&
+         "Target must not be in this RefSCC.");
 #ifdef EXPENSIVE_CHECKS
-  assert(TargetC.isDescendantOf(*this) &&
+  assert(G->lookupRefSCC(TargetN)->isDescendantOf(*this) &&
          "Target must be a descendant of the Source.");
 #endif
 




More information about the llvm-commits mailing list