LLVM 23.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
20namespace llvm {
21
23public:
24 DebuginfodFetcher(std::vector<std::string> DebugFileDirectories)
25 : BuildIDFetcher(std::move(DebugFileDirectories)) {}
26 ~DebuginfodFetcher() override = default;
27
28 /// Fetches the given Build ID using debuginfod and returns a local path to
29 /// the resulting file.
30 Expected<std::string> fetch(object::BuildIDRef BuildID) const override;
31};
32
33} // namespace llvm
34
35#endif // LLVM_DEBUGINFOD_DIFETCHER_H
This file declares a library for handling Build IDs and using them to find debug info.
~DebuginfodFetcher() override=default
DebuginfodFetcher(std::vector< std::string > DebugFileDirectories)
Expected< std::string > fetch(object::BuildIDRef BuildID) const override
Fetches the given Build ID using debuginfod and returns a local path to the resulting file.
Tagged union holding either a T or a Error.
Definition Error.h:485
BuildIDFetcher searches local cache directories for debug info.
Definition BuildID.h:41
BuildIDFetcher(std::vector< std::string > DebugFileDirectories)
Definition BuildID.h:43
ArrayRef< uint8_t > BuildIDRef
A reference to a BuildID in binary form.
Definition BuildID.h:30
This is an optimization pass for GlobalISel generic memory operations.
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:1917
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:860