[RS4GC] Remove an unnecessary assert & related variables
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 7 Oct 2015 02:39:27 +0000 (02:39 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 7 Oct 2015 02:39:27 +0000 (02:39 +0000)
I don't think this assert adds much value, and removing it and related
variables avoids an "unused variable" warning in release builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249511 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

index 17d969ed02a4573b65efd6bbdb3d93ed13efaf5b..e107ec58c2dec2f4e406033bb36b61835f814ad8 100644 (file)
@@ -1338,11 +1338,6 @@ makeStatepointExplicitImpl(const CallSite CS, /* to replace */
   assert(isStatepoint(CS) &&
          "This method expects to be rewriting a statepoint");
 
-  BasicBlock *BB = CS.getInstruction()->getParent();
-  Function *F = BB->getParent();
-  Module *M = F->getParent();
-  assert(M && "must be set");
-
   // We're not changing the function signature of the statepoint since the gc
   // arguments go into the var args section.
   Function *GCStatepointDecl = CS.getCalledFunction();