]> granicus.if.org Git - llvm/commitdiff
[coroutines] Add missing pass dependency.
authorGor Nishanov <GorNishanov@gmail.com>
Tue, 18 Jun 2019 19:49:48 +0000 (19:49 +0000)
committerGor Nishanov <GorNishanov@gmail.com>
Tue, 18 Jun 2019 19:49:48 +0000 (19:49 +0000)
Summary:
CoroSplit depends on CallGraphWrapperPass, but it was not explicitly adding it as a pass dependency.

This missing dependency can trigger errors / assertions / crashes in PMTopLevelManager::schedulePass() under certain configurations.

Author: ben-clayton

Reviewers: GorNishanov

Reviewed By: GorNishanov

Subscribers: capn, EricWF, modocache, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63144

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

lib/Transforms/Coroutines/CoroSplit.cpp

index a8de9fe3feb6807630dd626367ada91a92fbc8ed..8afb2f0ff115e9232d1ca1c8928b2bf502641c87 100644 (file)
@@ -946,7 +946,12 @@ struct CoroSplit : public CallGraphSCCPass {
 
 char CoroSplit::ID = 0;
 
-INITIALIZE_PASS(
+INITIALIZE_PASS_BEGIN(
+    CoroSplit, "coro-split",
+    "Split coroutine into a set of functions driving its state machine", false,
+    false)
+INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
+INITIALIZE_PASS_END(
     CoroSplit, "coro-split",
     "Split coroutine into a set of functions driving its state machine", false,
     false)