LLVM 20.0.0git
BuildIDFetcher.h
Go to the documentation of this file.
1//===- llvm/DebugInfod/BuildIDFetcher.h - Build ID fetcher ------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// This file declares a Build ID fetcher implementation for obtaining debug
11/// info from debuginfod.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_DEBUGINFOD_DIFETCHER_H
16#define LLVM_DEBUGINFOD_DIFETCHER_H
17
18#include "llvm/Object/BuildID.h"
19#include <optional>
20
21namespace llvm {
22
24public:
25 DebuginfodFetcher(std::vector<std::string> DebugFileDirectories)
26 : BuildIDFetcher(std::move(DebugFileDirectories)) {}
27 virtual ~DebuginfodFetcher() = default;
28
29 /// Fetches the given Build ID using debuginfod and returns a local path to
30 /// the resulting file.
31 std::optional<std::string> fetch(object::BuildIDRef BuildID) const override;
32};
33
34} // namespace llvm
35
36#endif // LLVM_DEBUGINFOD_DIFETCHER_H
This file declares a library for handling Build IDs and using them to find debug info.
std::optional< std::string > fetch(object::BuildIDRef BuildID) const override
Fetches the given Build ID using debuginfod and returns a local path to the resulting file.
virtual ~DebuginfodFetcher()=default
DebuginfodFetcher(std::vector< std::string > DebugFileDirectories)
BuildIDFetcher searches local cache directories for debug info.
Definition: BuildID.h:39
BuildIDFetcher(std::vector< std::string > DebugFileDirectories)
Definition: BuildID.h:41
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1856
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858