Expose sjlj preparation through opt for my own debugging purposes
authorReid Kleckner <reid@kleckner.net>
Thu, 9 Jul 2015 21:48:40 +0000 (21:48 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 9 Jul 2015 21:48:40 +0000 (21:48 +0000)
llvm-svn: 241864

llvm/include/llvm/InitializePasses.h
llvm/lib/CodeGen/SjLjEHPrepare.cpp
llvm/tools/opt/opt.cpp

index da614e4..e3b9a95 100644 (file)
@@ -303,6 +303,7 @@ void initializePlaceSafepointsPass(PassRegistry&);
 void initializeDwarfEHPreparePass(PassRegistry&);
 void initializeFloat2IntPass(PassRegistry&);
 void initializeLoopDistributePass(PassRegistry&);
+void initializeSjLjEHPreparePass(PassRegistry&);
 }
 
 #endif
index 9ca83f8..d236e1f 100644 (file)
@@ -82,6 +82,8 @@ private:
 } // end anonymous namespace
 
 char SjLjEHPrepare::ID = 0;
+INITIALIZE_PASS(SjLjEHPrepare, "sjljehprepare", "Prepare SjLj exceptions",
+                false, false)
 
 // Public Interface To the SjLjEHPrepare pass.
 FunctionPass *llvm::createSjLjEHPreparePass() { return new SjLjEHPrepare(); }
index 55426e7..0db60d1 100644 (file)
@@ -324,6 +324,7 @@ int main(int argc, char **argv) {
   initializeRewriteSymbolsPass(Registry);
   initializeWinEHPreparePass(Registry);
   initializeDwarfEHPreparePass(Registry);
+  initializeSjLjEHPreparePass(Registry);
 
 #ifdef LINK_POLLY_INTO_TOOLS
   polly::initializePollyPasses(Registry);