39 "0x%8.8" PRIx64
": missing FunctionInfo Size", Offset);
43 "0x%8.8" PRIx64
": missing FunctionInfo Name", Offset);
47 "0x%8.8" PRIx64
": invalid FunctionInfo Name value 0x%8.8x",
53 "0x%8.8" PRIx64
": missing FunctionInfo InfoType value", Offset);
57 "0x%8.8" PRIx64
": missing FunctionInfo InfoType length", Offset);
61 "0x%8.8" PRIx64
": missing FunctionInfo data for InfoType %u",
75 return LT.takeError();
80 FI.
Inline = std::move(II.get());
82 return II.takeError();
87 "0x%8.8" PRIx64
": unsupported InfoType %u",
98 "attempted to encode invalid FunctionInfo object");
101 const uint64_t FuncInfoOffset = O.
tell();
113 const auto StartOffset = O.
tell();
116 return std::move(err);
117 const off_t Length = O.
tell() - StartOffset;
118 if (Length > UINT32_MAX)
120 "LineTable length is greater than UINT32_MAX");
122 O.
fixup32(static_cast<uint32_t>(Length), StartOffset - 4);
131 const auto StartOffset = O.
tell();
134 return std::move(err);
135 const off_t Length = O.
tell() - StartOffset;
136 if (Length > UINT32_MAX)
138 "InlineInfo length is greater than UINT32_MAX");
140 O.
fixup32(static_cast<uint32_t>(Length), StartOffset - 4);
146 return FuncInfoOffset;
llvm::Optional< LineTable > OptLineTable
InfoType
FunctionInfo information type that is used to encode the optional data that is associated with a Func...
This class represents lattice values for constants.
Inline information stores the name of the inline function along with an array of address ranges...
void alignTo(size_t Align)
Pad with zeroes at the current file position until the current file position matches the specified al...
llvm::Optional< InlineInfo > Inline
Function information in GSYM files encodes information for one contiguous address range...
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.
Tagged union holding either a T or a Error.
LLVM_NODISCARD StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
bool isValid() const
Query if a FunctionInfo object is valid.
A simplified binary data writer class that doesn't require targets, target definitions, architectures, or require any other optional compile time libraries to be enabled via the build process.
static llvm::Expected< InlineInfo > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an InlineInfo object from a binary data stream.
static llvm::Expected< LineTable > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an LineTable object from a binary data stream.
static cl::opt< ITMode > IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT), cl::ZeroOrMore, cl::values(clEnumValN(DefaultIT, "arm-default-it", "Generate IT block based on arch"), clEnumValN(RestrictedIT, "arm-restrict-it", "Disallow deprecated IT based on ARMv8"), clEnumValN(NoRestrictedIT, "arm-no-restrict-it", "Allow IT blocks based on ARMv7")))
static llvm::Expected< FunctionInfo > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an object from a binary data stream.
uint32_t Name
String table offset in the string table.
llvm::Expected< uint64_t > encode(FileWriter &O) const
Encode this object into FileWriter stream.
uint64_t tell()
Return the current offset within the file.
Lightweight error class with error context and mandatory checking.
This class implements an extremely fast bulk output stream that can only output to a stream...
raw_ostream & operator<<(raw_ostream &OS, const FunctionInfo &R)
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.