[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
This commit is contained in:
Silviu Baranga
2016-09-14 14:09:43 +00:00
parent 3477191193
commit f64fd3777c
+1 -1
View File
@@ -50,7 +50,7 @@ static cl::opt<bool> 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) {