Files
revng-revng/include/revng/Support/ProgramRunner.h
Massimo Fioravanti afbebaf531 ProgramRunner: fix misuse of executable path
ProgramRunner was using garbage data instead of correctly using the path
to the current executable directory.
2022-01-17 18:17:54 +01:00

27 lines
526 B
C++

#pragma once
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include <string>
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
class ProgramRunner {
private:
std::string CurrentProgramPath;
llvm::SmallVector<llvm::StringRef, 64> Paths;
public:
ProgramRunner();
/// returns the exit code of the program.
[[nodiscard]] int
run(llvm::StringRef ProgramName, llvm::ArrayRef<std::string> Args);
};
extern ProgramRunner Runner;