summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit16a413103c666526a9a10eb6194ee484c7b8ae78 (patch)
treebe47a1220d984393c7f47085267d2156bfc60d54 /llvm/tools/bugpoint/BugDriver.cpp
parent0aebf8f80a76514ddcc6483a771a13ddf215e062 (diff)
downloadbcm5719-llvm-16a413103c666526a9a10eb6194ee484c7b8ae78.tar.gz
bcm5719-llvm-16a413103c666526a9a10eb6194ee484c7b8ae78.zip
Implement support for bugpoint to identify which FUNCTION an optimization
is miscompiling. llvm-svn: 5893
Diffstat (limited to 'llvm/tools/bugpoint/BugDriver.cpp')
-rw-r--r--llvm/tools/bugpoint/BugDriver.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/tools/bugpoint/BugDriver.cpp b/llvm/tools/bugpoint/BugDriver.cpp
index c204ab45b29..05dff34b84e 100644
--- a/llvm/tools/bugpoint/BugDriver.cpp
+++ b/llvm/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.
///
OpenPOWER on IntegriCloud