#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LLVMDriver.h"
usingnamespacellvm;
namespace {
enum ID { … };
#define PREFIX …
#include "Opts.inc"
#undef PREFIX
usingnamespacellvm::opt;
static constexpr opt::OptTable::Info InfoTable[] = …;
class DebuginfodFindOptTable : public opt::GenericOptTable { … };
}
static std::string InputBuildID;
static bool FetchExecutable;
static bool FetchDebuginfo;
static std::string FetchSource;
static bool DumpToStdout;
static std::vector<std::string> DebugFileDirectory;
static void parseArgs(int argc, char **argv) { … }
[[noreturn]] static void helpExit() { … }
ExitOnError ExitOnDebuginfodFindError;
static std::string fetchDebugInfo(object::BuildIDRef BuildID);
int llvm_debuginfod_find_main(int argc, char **argv,
const llvm::ToolContext &) { … }
std::string fetchDebugInfo(object::BuildIDRef BuildID) { … }