LLVM  15.0.0git
DIFetcher.h
Go to the documentation of this file.
1 //===-- llvm/DebugInfo/Symbolize/DIFetcher.h --------------------*- 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 DIFetcher abstraction for obtaining debug info from an
11 /// arbitrary outside source.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_DEBUGINFO_SYMBOLIZE_DIFETCHER_H
16 #define LLVM_DEBUGINFO_SYMBOLIZE_DIFETCHER_H
17 
18 #include <cstdint>
19 #include <string>
20 
21 #include "llvm/ADT/ArrayRef.h"
22 
23 namespace llvm {
24 namespace symbolize {
25 
26 /// The DIFetcher interface provides arbitrary mechanisms for obtaining debug
27 /// info from an outside source.
28 class DIFetcher {
29 public:
30  virtual ~DIFetcher() = default;
31  virtual Optional<std::string>
33 };
34 
35 /// LocalDIFetcher searches local cache directories for debug info.
36 class LocalDIFetcher : public DIFetcher {
37 public:
39  : DebugFileDirectory(DebugFileDirectory){};
40  virtual ~LocalDIFetcher() = default;
41 
43 
44 private:
45  const ArrayRef<std::string> DebugFileDirectory;
46 };
47 
48 } // end namespace symbolize
49 } // end namespace llvm
50 
51 #endif // LLVM_DEBUGINFO_SYMBOLIZE_DIFETCHER_H
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::symbolize::LocalDIFetcher::fetchBuildID
Optional< std::string > fetchBuildID(ArrayRef< uint8_t > BuildID) const override
Definition: DIFetcher.cpp:24
llvm::Optional< std::string >
llvm::symbolize::LocalDIFetcher::LocalDIFetcher
LocalDIFetcher(ArrayRef< std::string > DebugFileDirectory)
Definition: DIFetcher.h:38
llvm::symbolize::DIFetcher
The DIFetcher interface provides arbitrary mechanisms for obtaining debug info from an outside source...
Definition: DIFetcher.h:28
ArrayRef.h
llvm::ArrayRef< uint8_t >
llvm::symbolize::LocalDIFetcher::~LocalDIFetcher
virtual ~LocalDIFetcher()=default
llvm::symbolize::DIFetcher::fetchBuildID
virtual Optional< std::string > fetchBuildID(ArrayRef< uint8_t > BuildID) const =0
llvm::symbolize::LocalDIFetcher
LocalDIFetcher searches local cache directories for debug info.
Definition: DIFetcher.h:36
llvm::symbolize::DIFetcher::~DIFetcher
virtual ~DIFetcher()=default