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