1 //===- llvm/DebugInfod/DIFetcher.h - Debug info 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 DIFetcher implementation for obtaining debug info from 11 /// debuginfod. 12 /// 13 //===----------------------------------------------------------------------===// 14 15 #ifndef LLVM_DEBUGINFOD_DIFETCHER_H 16 #define LLVM_DEBUGINFOD_DIFETCHER_H 17 18 #include "llvm/ADT/ArrayRef.h" 19 #include "llvm/DebugInfo/Symbolize/DIFetcher.h" 20 21 namespace llvm { 22 23 class DebuginfodDIFetcher : public symbolize::DIFetcher { 24 public: 25 virtual ~DebuginfodDIFetcher() = default; 26 27 /// Fetches the given Build ID using debuginfod and returns a local path to 28 /// the resulting debug binary. 29 Optional<std::string> fetchBuildID(ArrayRef<uint8_t> BuildID) const override; 30 }; 31 32 } // namespace llvm 33 34 #endif // LLVM_DEBUGINFOD_DIFETCHER_H 35