From 1d9ab2556024514c403135bb8fe5da34fc4f0c63 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 20 Jan 2014 11:34:08 +0000 Subject: [PM] Wire up the Verifier for the new pass manager and connect it to the various opt verifier commandline options. Mostly mechanical wiring of the verifier to the new pass manager. Exercises one of the more unusual aspects of it -- a pass can be either a module or function pass interchangably. If this is ever problematic, we can make things more constrained, but for things like the verifier where there is an "obvious" applicability at both levels, it seems convenient. This is the next-to-last piece of basic functionality left to make the opt commandline driving of the new pass manager minimally functional for testing and further development. There is still a lot to be done there (notably the factoring into .def files to kill the current boilerplate code) but it is relatively uninteresting. The only interesting bit left for minimal functionality is supporting the registration of analyses. I'm planning on doing that on top of the .def file switch mostly because the boilerplate for the analyses would be significantly worse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199646 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/opt/NewPMDriver.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/opt/NewPMDriver.h') diff --git a/tools/opt/NewPMDriver.h b/tools/opt/NewPMDriver.h index 2ae1ad5d83..3661d3e677 100644 --- a/tools/opt/NewPMDriver.h +++ b/tools/opt/NewPMDriver.h @@ -34,6 +34,11 @@ enum OutputKind { OK_OutputAssembly, OK_OutputBitcode }; +enum VerifierKind { + VK_NoVerifier, + VK_VerifyInAndOut, + VK_VerifyEachPass +}; } /// \brief Driver function to run the new pass manager over a module. @@ -44,7 +49,7 @@ enum OutputKind { /// when the transition finishes. bool runPassPipeline(StringRef Arg0, LLVMContext &Context, Module &M, tool_output_file *Out, StringRef PassPipeline, - opt_tool::OutputKind OK); + opt_tool::OutputKind OK, opt_tool::VerifierKind VK); } #endif -- cgit v1.2.3