LLVM 20.0.0git
DylibReader.h
Go to the documentation of this file.
1//===- TextAPI/DylibReader.h - TAPI MachO Dylib Reader ----------*- 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/// Defines the MachO Dynamic Library Reader.
10///
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TEXTAPI_DYLIBREADER_H
14#define LLVM_TEXTAPI_DYLIBREADER_H
15
16#include "llvm/ADT/StringMap.h"
17#include "llvm/Support/Error.h"
21
23
25 /// Determines arch slice to parse.
27 /// Capture Mach-O header from binary, primarily load commands.
28 bool MachOHeader = true;
29 /// Capture defined symbols out of export trie and n-list.
30 bool SymbolTable = true;
31 /// Capture undefined symbols too.
32 bool Undefineds = true;
33};
34
35/// Parse Mach-O dynamic libraries to extract TAPI attributes.
36///
37/// \param Buffer Data that points to dylib.
38/// \param Options Determines which attributes to extract.
39/// \return List of record slices.
41
42/// Get TAPI file representation of binary dylib.
43///
44/// \param Buffer Data that points to dylib.
46
48/// Get the source location for each symbol from dylib.
49///
50/// \param DSYM Path to DSYM file.
51/// \param T Requested target slice for dylib.
53 const Target &T);
54
55} // namespace llvm::MachO::DylibReader
56
57#endif // LLVM_TEXTAPI_DYLIBREADER_H
This file defines the StringMap class.
Implements the TAPI Record Collection Type.
Tagged union holding either a T or a Error.
Definition: Error.h:481
static ArchitectureSet All()
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:128
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Defines the MachO Dynamic Library Reader.
Definition: DylibReader.h:22
Expected< Records > readFile(MemoryBufferRef Buffer, const ParseOption &Opt)
Parse Mach-O dynamic libraries to extract TAPI attributes.
SymbolToSourceLocMap accumulateSourceLocFromDSYM(const StringRef DSYM, const Target &T)
Get the source location for each symbol from dylib.
Expected< std::unique_ptr< InterfaceFile > > get(MemoryBufferRef Buffer)
Get TAPI file representation of binary dylib.
bool Undefineds
Capture undefined symbols too.
Definition: DylibReader.h:32
bool MachOHeader
Capture Mach-O header from binary, primarily load commands.
Definition: DylibReader.h:28
bool SymbolTable
Capture defined symbols out of export trie and n-list.
Definition: DylibReader.h:30
ArchitectureSet Archs
Determines arch slice to parse.
Definition: DylibReader.h:26