From: Silviu Baranga Date: Wed, 14 Sep 2016 14:09:43 +0000 (+0000) Subject: [StackProtector] Use INITIALIZE_TM_PASS instead of INITIALIZE_PASS X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f64fd3777c15b0145afeb57f62ca38bca97f4fed;p=llvm [StackProtector] Use INITIALIZE_TM_PASS instead of INITIALIZE_PASS in order to make sure that its TargetMachine constructor is registered. This allows us to run the PEI machine pass with MIR input (see PR30324). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281474 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/StackProtector.cpp b/lib/CodeGen/StackProtector.cpp index 89868e43aba..fa0611391f6 100644 --- a/lib/CodeGen/StackProtector.cpp +++ b/lib/CodeGen/StackProtector.cpp @@ -50,7 +50,7 @@ static cl::opt EnableSelectionDAGSP("enable-selectiondag-sp", cl::init(true), cl::Hidden); char StackProtector::ID = 0; -INITIALIZE_PASS(StackProtector, "stack-protector", "Insert stack protectors", +INITIALIZE_TM_PASS(StackProtector, "stack-protector", "Insert stack protectors", false, true) FunctionPass *llvm::createStackProtectorPass(const TargetMachine *TM) {