|
|
|||
File indexing completed on 2026-05-10 08:44:17
0001 //===- llvm/Object/BuildID.h - Build ID -------------------------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 /// 0009 /// \file 0010 /// This file declares a library for handling Build IDs and using them to find 0011 /// debug info. 0012 /// 0013 //===----------------------------------------------------------------------===// 0014 0015 #ifndef LLVM_DEBUGINFO_OBJECT_BUILDID_H 0016 #define LLVM_DEBUGINFO_OBJECT_BUILDID_H 0017 0018 #include "llvm/ADT/ArrayRef.h" 0019 #include "llvm/ADT/SmallVector.h" 0020 0021 namespace llvm { 0022 namespace object { 0023 0024 /// A build ID in binary form. 0025 typedef SmallVector<uint8_t, 10> BuildID; 0026 0027 /// A reference to a BuildID in binary form. 0028 typedef ArrayRef<uint8_t> BuildIDRef; 0029 0030 class ObjectFile; 0031 0032 /// Parses a build ID from a hex string. 0033 BuildID parseBuildID(StringRef Str); 0034 0035 /// Returns the build ID, if any, contained in the given object file. 0036 BuildIDRef getBuildID(const ObjectFile *Obj); 0037 0038 /// BuildIDFetcher searches local cache directories for debug info. 0039 class BuildIDFetcher { 0040 public: 0041 BuildIDFetcher(std::vector<std::string> DebugFileDirectories) 0042 : DebugFileDirectories(std::move(DebugFileDirectories)) {} 0043 virtual ~BuildIDFetcher() = default; 0044 0045 /// Returns the path to the debug file with the given build ID. 0046 virtual std::optional<std::string> fetch(BuildIDRef BuildID) const; 0047 0048 private: 0049 const std::vector<std::string> DebugFileDirectories; 0050 }; 0051 0052 } // namespace object 0053 } // namespace llvm 0054 0055 #endif // LLVM_DEBUGINFO_OBJECT_BUILDID_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|