LLVM: lib/DebugInfo/GSYM/MergedFunctionsInfo.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
13
14using namespace llvm;
15using namespace gsym;
16
18
23 const auto StartOffset = Out.tell();
24
25
27 if (!result)
29 const auto Length = Out.tell() - StartOffset;
31 }
33}
34
39
40 if (!FuncExtractorsOrError)
41 return FuncExtractorsOrError.takeError();
42
43 for (DataExtractor &FuncData : *FuncExtractorsOrError) {
45 if (!FI)
48 }
49
50 return MFI;
51}
52
55 std::vector Results;
57
58
59 if (.isValidOffsetForDataOfSize(Offset, 4))
61 std::errc::io_error,
62 "unable to read the function count at offset 0x%8.8" PRIx64, Offset);
63
65
67
68 if (.isValidOffsetForDataOfSize(Offset, 4))
70 std::errc::io_error,
71 "unable to read size of function %u at offset 0x%8.8" PRIx64, i,
73
75
76
77 if (.isValidOffsetForDataOfSize(Offset, FnSize))
79 std::errc::io_error,
80 "function data is truncated for function %u at offset 0x%8.8" PRIx64
81 ", expected size %u",
83
84
86 Data.isLittleEndian(), Data.getAddressSize());
87
89 }
91}
92
95 return LHS.MergedFunctions == RHS.MergedFunctions;
96}
Function Alias Analysis Results
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
A simplified binary data writer class that doesn't require targets, target definitions,...
LLVM_ABI uint64_t tell()
Return the current offset within the file.
LLVM_ABI void fixup32(uint32_t Value, uint64_t Offset)
Fixup a uint32_t value at the specified offset in the stream.
LLVM_ABI void writeU32(uint32_t Value)
Write a single uint32_t value into the stream at the current file position.
bool operator==(const FunctionInfo &LHS, const FunctionInfo &RHS)
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
FunctionAddr VTableAddr Count
FunctionAddr VTableAddr uintptr_t uintptr_t Data
static LLVM_ABI llvm::Expected< FunctionInfo > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an object from a binary data stream.
static LLVM_ABI llvm::Expected< MergedFunctionsInfo > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an MergedFunctionsInfo object from a binary data stream.
Definition MergedFunctionsInfo.cpp:36
static LLVM_ABI llvm::Expected< std::vector< DataExtractor > > getFuncsDataExtractors(DataExtractor &Data)
Get a vector of DataExtractor objects for the functions in this MergedFunctionsInfo object.
Definition MergedFunctionsInfo.cpp:54
LLVM_ABI void clear()
Definition MergedFunctionsInfo.cpp:17
LLVM_ABI llvm::Error encode(FileWriter &O) const
Encode this MergedFunctionsInfo object into FileWriter stream.
Definition MergedFunctionsInfo.cpp:19
std::vector< FunctionInfo > MergedFunctions