summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2014-09-14 20:36:28 +0000
committerYaron Keren <yaron.keren@gmail.com>2014-09-14 20:36:28 +0000
commit66b0cebf7f736d888aae6c9aeb8c144049c24528 (patch)
treebf50252fe38eadac2471ab00c097897d76a1c62a /llvm/lib/CodeGen
parentf620a575bf0cad9935bd307e04414f9f7f186399 (diff)
downloadbcm5719-llvm-66b0cebf7f736d888aae6c9aeb8c144049c24528.tar.gz
bcm5719-llvm-66b0cebf7f736d888aae6c9aeb8c144049c24528.zip
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
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/DwarfEHPrepare.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
index 705e5d657c3..75b74d9a6c3 100644
--- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
@@ -51,6 +51,11 @@ namespace {
bool runOnFunction(Function &Fn) override;
+ bool doFinalization(Module &M) override {
+ RewindFunction = nullptr;
+ return false;
+ }
+
void getAnalysisUsage(AnalysisUsage &AU) const override { }
const char *getPassName() const override {
OpenPOWER on IntegriCloud