[llvm] r281474 - [StackProtector] Use INITIALIZE_TM_PASS instead of INITIALIZE_PASS

Silviu Baranga via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 07:09:43 PDT 2016


Author: sbaranga
Date: Wed Sep 14 09:09:43 2016
New Revision: 281474

URL: http://llvm.org/viewvc/llvm-project?rev=281474&view=rev
Log:
[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).

Modified:
    llvm/trunk/lib/CodeGen/StackProtector.cpp

Modified: llvm/trunk/lib/CodeGen/StackProtector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackProtector.cpp?rev=281474&r1=281473&r2=281474&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/StackProtector.cpp (original)
+++ llvm/trunk/lib/CodeGen/StackProtector.cpp Wed Sep 14 09:09:43 2016
@@ -50,7 +50,7 @@ static cl::opt<bool> EnableSelectionDAGS
                                           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) {




More information about the llvm-commits mailing list