From: NAKAMURA Takumi Date: Thu, 7 May 2015 10:18:46 +0000 (+0000) Subject: Scalar/PlaceSafepoints.cpp: Fix a warning introduced in r228090. [-Wunused-variable] X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=c128e5c8c203b0f58850cd01b8ba2e19fb4792dc;hp=a3ded6b432ecc845fa58418d9c6f890e6704e3d1 Scalar/PlaceSafepoints.cpp: Fix a warning introduced in r228090. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236711 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/PlaceSafepoints.cpp b/lib/Transforms/Scalar/PlaceSafepoints.cpp index 016591d85c2..59cc865dbb0 100644 --- a/lib/Transforms/Scalar/PlaceSafepoints.cpp +++ b/lib/Transforms/Scalar/PlaceSafepoints.cpp @@ -868,10 +868,8 @@ static BasicBlock *normalizeBBForInvokeSafepoint(BasicBlock *BB, /// 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