diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp index 016591d85c2..59cc865dbb0 100644 --- a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp +++ b/llvm/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 |