LLVM 20.0.0git
MergedFunctionsInfo.h
Go to the documentation of this file.
1//===- MergedFunctionsInfo.h ------------------------------------*- 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#ifndef LLVM_DEBUGINFO_GSYM_MERGEDFUNCTIONSINFO_H
10#define LLVM_DEBUGINFO_GSYM_MERGEDFUNCTIONSINFO_H
11
13#include "llvm/Support/Error.h"
14#include <stdint.h>
15#include <vector>
16
17namespace llvm {
18class raw_ostream;
19
20namespace gsym {
21
22class GsymReader;
23struct FunctionInfo;
25 std::vector<FunctionInfo> MergedFunctions;
26
27 void clear();
28
29 /// Query if a MergedFunctionsInfo object is valid.
30 ///
31 /// \returns A boolean indicating if this FunctionInfo is valid.
32 bool isValid() { return !MergedFunctions.empty(); }
33
34 /// Decode an MergedFunctionsInfo object from a binary data stream.
35 ///
36 /// \param Data The binary stream to read the data from. This object must have
37 /// the data for the MergedFunctionsInfo object starting at offset zero. The
38 /// data can contain more data than needed.
39 ///
40 /// \param BaseAddr The base address to use when encoding all address ranges.
41 ///
42 /// \returns An MergedFunctionsInfo or an error describing the issue that was
43 /// encountered during decoding.
45 uint64_t BaseAddr);
46
47 /// Encode this MergedFunctionsInfo object into FileWriter stream.
48 ///
49 /// \param O The binary stream to write the data to at the current file
50 /// position.
51 /// \returns An error object that indicates success or failure for the
52 /// encoding process.
54};
55
57
58} // namespace gsym
59} // namespace llvm
60
61#endif // LLVM_DEBUGINFO_GSYM_MERGEDFUNCTIONSINFO_H
Value * RHS
Value * LHS
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
Tagged union holding either a T or a Error.
Definition: Error.h:481
A simplified binary data writer class that doesn't require targets, target definitions,...
Definition: FileWriter.h:29
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
static llvm::Expected< MergedFunctionsInfo > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an MergedFunctionsInfo object from a binary data stream.
bool isValid()
Query if a MergedFunctionsInfo object is valid.
llvm::Error encode(FileWriter &O) const
Encode this MergedFunctionsInfo object into FileWriter stream.
std::vector< FunctionInfo > MergedFunctions