getParent() ^ 3 == getModule() ; NFCI
[oota-llvm.git] / lib / Transforms / Scalar / PlaceSafepoints.cpp
index 379d9639f9174c99769a5592b70b434d7152cb34..169a09ece02581931b6c8f332339da8447d36f0b 100644 (file)
@@ -832,8 +832,7 @@ InsertSafepointPoll(Instruction *InsertBefore,
 /// NOT do explicit relocation for GC support.
 static Value *ReplaceWithStatepoint(const CallSite &CS, /* to replace */
                                     Pass *P) {
-  assert(CS.getInstruction()->getParent()->getParent()->getParent() &&
-         "must be set");
+  assert(CS.getInstruction()->getModule() && "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