Files
revng-revng/include/revng/Support/ProgramRunner.h
Djordje Todorovic 961f9e5461 Model: search debug info locally upon import
Also find prototypes in Models of dynamic libs for both PE and ELF.
2022-12-13 11:26:54 +01:00

29 lines
595 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:
llvm::SmallVector<std::string, 64> Paths;
public:
ProgramRunner();
/// Returns true if the program could be found.
bool isProgramAvailable(llvm::StringRef ProgramName);
/// returns the exit code of the program.
[[nodiscard]] int
run(llvm::StringRef ProgramName, llvm::ArrayRef<std::string> Args);
};
extern ProgramRunner Runner;