summaryrefslogtreecommitdiff
path: root/tools/bugpoint/BugDriver.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-24 17:02:17 +0000
committerChris Lattner <sabre@nondot.org>2003-04-24 17:02:17 +0000
commit640f22e66d90439857a97a83896ee68c4f7128c9 (patch)
tree47bce45dc762178d2e8f5e9d03cbbcae4be925bc /tools/bugpoint/BugDriver.cpp
parent7899b74fdbb58bcb50641703b6f1f212a3aebcb0 (diff)
downloadllvm-640f22e66d90439857a97a83896ee68c4f7128c9.tar.gz
llvm-640f22e66d90439857a97a83896ee68c4f7128c9.tar.bz2
llvm-640f22e66d90439857a97a83896ee68c4f7128c9.tar.xz
Implement support for bugpoint to identify which FUNCTION an optimization
is miscompiling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/BugDriver.cpp')
-rw-r--r--tools/bugpoint/BugDriver.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp
index c204ab45b2..05dff34b84 100644
--- a/tools/bugpoint/BugDriver.cpp
+++ b/tools/bugpoint/BugDriver.cpp
@@ -14,6 +14,20 @@
#include "llvm/Pass.h"
#include <memory>
+/// getPassesString - Turn a list of passes into a string which indicates the
+/// command line options that must be passed to add the passes.
+///
+std::string getPassesString(const std::vector<const PassInfo*> &Passes) {
+ std::string Result;
+ for (unsigned i = 0, e = Passes.size(); i != e; ++i) {
+ if (i) Result += " ";
+ Result += "-";
+ Result += Passes[i]->getPassArgument();
+ }
+ return Result;
+}
+
+
/// ParseInputFile - Given a bytecode or assembly input filename, parse and
/// return it, or return null if not possible.
///