DIFetcher.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- llvm/DebugInfod/DIFetcher.h - Debug info fetcher----------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. ///
  14. /// \file
  15. /// This file declares a DIFetcher implementation for obtaining debug info from
  16. /// debuginfod.
  17. ///
  18. //===----------------------------------------------------------------------===//
  19. #ifndef LLVM_DEBUGINFOD_DIFETCHER_H
  20. #define LLVM_DEBUGINFOD_DIFETCHER_H
  21. #include "llvm/ADT/ArrayRef.h"
  22. #include "llvm/DebugInfo/Symbolize/DIFetcher.h"
  23. namespace llvm {
  24. class DebuginfodDIFetcher : public symbolize::DIFetcher {
  25. public:
  26. virtual ~DebuginfodDIFetcher() = default;
  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. } // namespace llvm
  32. #endif // LLVM_DEBUGINFOD_DIFETCHER_H
  33. #ifdef __GNUC__
  34. #pragma GCC diagnostic pop
  35. #endif