diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-01-13 03:08:40 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-01-13 03:08:40 +0000 |
commit | 4a76032da63f0c9006336d9b9ab1074cf657b2c3 (patch) | |
tree | 54de43766a12eea76e6ea84c56df76eaa53b5849 /tools/opt/NewPMDriver.cpp | |
parent | 63735e79ff83cf8b123231cceac10903b3d0ef22 (diff) | |
download | llvm-4a76032da63f0c9006336d9b9ab1074cf657b2c3.tar.gz llvm-4a76032da63f0c9006336d9b9ab1074cf657b2c3.tar.bz2 llvm-4a76032da63f0c9006336d9b9ab1074cf657b2c3.tar.xz |
[PM] Add an enum for describing the desired output strategy, and run
that through the interface rather than a simple bool. This should allow
starting to wire up real output to round-trip IR through opt with the
new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/NewPMDriver.cpp')
-rw-r--r-- | tools/opt/NewPMDriver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/opt/NewPMDriver.cpp b/tools/opt/NewPMDriver.cpp index e577995e26..b05da36d28 100644 --- a/tools/opt/NewPMDriver.cpp +++ b/tools/opt/NewPMDriver.cpp @@ -23,10 +23,11 @@ #include "llvm/Support/ToolOutputFile.h" using namespace llvm; +using namespace opt_tool; bool llvm::runPassPipeline(StringRef Arg0, LLVMContext &Context, Module &M, tool_output_file *Out, StringRef PassPipeline, - bool NoOutput) { + OutputKind OK) { // Before executing passes, print the final values of the LLVM options. cl::PrintOptionValues(); @@ -40,7 +41,7 @@ bool llvm::runPassPipeline(StringRef Arg0, LLVMContext &Context, Module &M, MPM.run(&M); // Declare success. - if (!NoOutput) + if (OK != OK_NoOutput) Out->keep(); return true; } |