Skip to content

Commit 66b0ceb

Browse files
committed
In DwarfEHPrepare, after all passes are run, RewindFunction may be a dangling
pointer to a dead function. To make sure it's valid, doFinalization nullptrs RewindFunction just like the constructor and so it will be found on next run. llvm-svn: 217737
1 parent f620a57 commit 66b0ceb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/CodeGen/DwarfEHPrepare.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ namespace {
5151

5252
bool runOnFunction(Function &Fn) override;
5353

54+
bool doFinalization(Module &M) override {
55+
RewindFunction = nullptr;
56+
return false;
57+
}
58+
5459
void getAnalysisUsage(AnalysisUsage &AU) const override { }
5560

5661
const char *getPassName() const override {

0 commit comments

Comments
 (0)