Files
revng-revng/lib/Model/Importer/DebugInfo/ImportDebugInfoHelper.h
Giacomo Vercesi 6cdf6b9eda DebugInfo: do --verbose if logger is enabled
Enable running `fetch-debuginfo` in verbose mode if the logger is
enabled.
2025-03-13 18:03:50 +01:00

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