[llvm] r236711 - Scalar/PlaceSafepoints.cpp: Fix a warning introduced in r228090. [-Wunused-variable]

NAKAMURA Takumi geek4civic at gmail.com
Thu May 7 03:18:46 PDT 2015


Author: chapuni
Date: Thu May  7 05:18:46 2015
New Revision: 236711

URL: http://llvm.org/viewvc/llvm-project?rev=236711&view=rev
Log:
Scalar/PlaceSafepoints.cpp: Fix a warning introduced in r228090. [-Wunused-variable]

Modified:
    llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp?rev=236711&r1=236710&r2=236711&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp Thu May  7 05:18:46 2015
@@ -868,10 +868,8 @@ static BasicBlock *normalizeBBForInvokeS
 /// NOT do explicit relocation for GC support.
 static Value *ReplaceWithStatepoint(const CallSite &CS, /* to replace */
                                     Pass *P) {
-  BasicBlock *BB = CS.getInstruction()->getParent();
-  Function *F = BB->getParent();
-  Module *M = F->getParent();
-  assert(M && "must be set");
+  assert(CS.getInstruction()->getParent()->getParent()->getParent() &&
+         "must be set");
 
   // TODO: technically, a pass is not allowed to get functions from within a
   // function pass since it might trigger a new function addition.  Refactor





More information about the llvm-commits mailing list