23 const auto StartOffset = Out.
tell();
40 if (!FuncExtractorsOrError)
41 return FuncExtractorsOrError.takeError();
55 std::vector<DataExtractor>
Results;
59 if (!
Data.isValidOffsetForDataOfSize(
Offset, 4))
62 "unable to read the function count at offset 0x%8.8" PRIx64,
Offset);
66 for (
uint32_t i = 0; i < Count; ++i) {
68 if (!
Data.isValidOffsetForDataOfSize(
Offset, 4))
71 "unable to read size of function %u at offset 0x%8.8" PRIx64, i,
77 if (!
Data.isValidOffsetForDataOfSize(
Offset, FnSize))
80 "function data is truncated for function %u at offset 0x%8.8" PRIx64
86 Data.isLittleEndian(),
Data.getAddressSize());
95 return LHS.MergedFunctions ==
RHS.MergedFunctions;
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,...
uint64_t tell()
Return the current offset within the file.
void fixup32(uint32_t Value, uint64_t Offset)
Fixup a uint32_t value at the specified offset in the stream.
void writeU32(uint32_t Value)
Write a single uint32_t value into the stream at the current file position.
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.
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
static llvm::Expected< FunctionInfo > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an object from a binary data stream.
static llvm::Expected< MergedFunctionsInfo > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an MergedFunctionsInfo object from a binary data stream.
static llvm::Expected< std::vector< DataExtractor > > getFuncsDataExtractors(DataExtractor &Data)
Get a vector of DataExtractor objects for the functions in this MergedFunctionsInfo object.
llvm::Error encode(FileWriter &O) const
Encode this MergedFunctionsInfo object into FileWriter stream.
std::vector< FunctionInfo > MergedFunctions