diff options
Diffstat (limited to 'llvm/tools/bugpoint/ToolRunner.h')
| -rw-r--r-- | llvm/tools/bugpoint/ToolRunner.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.h b/llvm/tools/bugpoint/ToolRunner.h index f218ad534ee..ef8551cc669 100644 --- a/llvm/tools/bugpoint/ToolRunner.h +++ b/llvm/tools/bugpoint/ToolRunner.h @@ -49,7 +49,8 @@ class CC { public: enum FileType { AsmFile, ObjectFile, CFile }; - static CC *create(std::string &Message, const std::string &CCBinary, + static CC *create(const char *Argv0, std::string &Message, + const std::string &CCBinary, const std::vector<std::string> *Args); /// ExecuteProgram - Execute the program specified by "ProgramFile" (which is @@ -98,11 +99,11 @@ public: const std::vector<std::string> *Args = nullptr); static AbstractInterpreter * - createCustomCompiler(std::string &Message, + createCustomCompiler(const char *Argv0, std::string &Message, const std::string &CompileCommandLine); static AbstractInterpreter * - createCustomExecutor(std::string &Message, + createCustomExecutor(const char *Argv0, std::string &Message, const std::string &ExecCommandLine); virtual ~AbstractInterpreter() {} @@ -178,6 +179,13 @@ public: unsigned MemoryLimit = 0) override; }; +/// Find the first executable file \ExeName, either in the user's PATH or, +/// failing that, in the same directory as argv[0]. This allows us to find +/// another LLVM tool if it is built in the same directory. If no executable is +/// found, an error is returned. +ErrorOr<std::string> FindProgramByName(const std::string &ExeName, + const char *Argv0, void *MainAddr); + } // End llvm namespace #endif |

