LLVM  15.0.0git
DIFetcher.cpp
Go to the documentation of this file.
1 //===- llvm/DebugInfod/DIFetcher.cpp - Debug info fetcher -----------------===//
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 defines a DIFetcher implementation for obtaining debug info
11 /// from debuginfod.
12 ///
13 //===----------------------------------------------------------------------===//
14 
16 
18 
19 using namespace llvm;
20 
24  if (PathOrErr)
25  return *PathOrErr;
26  consumeError(PathOrErr.takeError());
27  return None;
28 }
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1185
llvm::Optional< std::string >
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::consumeError
void consumeError(Error Err)
Consume a Error without doing anything.
Definition: Error.h:1043
llvm::None
const NoneType None
Definition: None.h:24
Debuginfod.h
llvm::ArrayRef< uint8_t >
DIFetcher.h
llvm::Expected::takeError
Error takeError()
Take ownership of the stored error.
Definition: Error.h:597
llvm::DebuginfodDIFetcher::fetchBuildID
Optional< std::string > fetchBuildID(ArrayRef< uint8_t > BuildID) const override
Fetches the given Build ID using debuginfod and returns a local path to the resulting debug binary.
Definition: DIFetcher.cpp:22
llvm::getCachedOrDownloadDebuginfo
Expected< std::string > getCachedOrDownloadDebuginfo(BuildIDRef ID)
Fetches a debug binary by searching the default local cache directory and server URLs.
Definition: Debuginfod.cpp:91