summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/ResetMachineFunctionPass.cpp')
-rw-r--r--llvm/lib/CodeGen/ResetMachineFunctionPass.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
index 88d550e14a3..a02302e6ff9 100644
--- a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
@@ -18,6 +18,7 @@
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
+#include "llvm/CodeGen/StackProtector.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/Support/Debug.h"
@@ -44,6 +45,11 @@ namespace {
StringRef getPassName() const override { return "ResetMachineFunction"; }
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
+ AU.addPreserved<StackProtector>();
+ MachineFunctionPass::getAnalysisUsage(AU);
+ }
+
bool runOnMachineFunction(MachineFunction &MF) override {
// No matter what happened, whether we successfully selected the function
// or not, nothing is going to use the vreg types after us. Make sure they
OpenPOWER on IntegriCloud