From 640f22e66d90439857a97a83896ee68c4f7128c9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 24 Apr 2003 17:02:17 +0000 Subject: 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 --- tools/bugpoint/BugDriver.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tools/bugpoint/BugDriver.cpp') 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 +/// 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 &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. /// -- cgit v1.2.3