mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
6cdf6b9eda
Enable running `fetch-debuginfo` in verbose mode if the logger is enabled.
26 lines
650 B
C++
26 lines
650 B
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "llvm/Support/Path.h"
|
|
#include "llvm/Support/Process.h"
|
|
|
|
#include "revng/Support/Assert.h"
|
|
#include "revng/Support/ProgramRunner.h"
|
|
|
|
namespace {
|
|
|
|
inline int runFetchDebugInfo(llvm::StringRef InputFileName, bool Verbose) {
|
|
revng_assert(::Runner.isProgramAvailable("revng"));
|
|
std::vector<std::string> Args{ "model",
|
|
"fetch-debuginfo",
|
|
InputFileName.str() };
|
|
if (Verbose)
|
|
Args.insert(Args.begin(), "--verbose");
|
|
return ::Runner.run("revng", Args);
|
|
}
|
|
|
|
} // namespace
|