9#ifndef LLVM_DEBUGINFO_MSF_MSFCOMMON_H
10#define LLVM_DEBUGINFO_MSF_MSFCOMMON_H
24static const char Magic[] = {
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
25 't',
' ',
'C',
'/',
'C',
'+',
'+',
' ',
26 'M',
'S',
'F',
' ',
'7',
'.',
'0',
'0',
27 '\r',
'\n',
'\x1a',
'D',
'S',
'\0',
'\0',
'\0'};
69 std::vector<ArrayRef<support::ulittle32_t>>
StreamMap;
81 std::vector<support::ulittle32_t>
Blocks;
88 bool IncludeUnusedFpmData =
false,
141 return L.SB->BlockSize;
157 bool IncludeUnusedFpmData,
int FpmNumber) {
158 assert(FpmNumber == 1 || FpmNumber == 2);
159 if (IncludeUnusedFpmData) {
173 bool IncludeUnusedFpmData =
false,
174 bool AltFpm =
false) {
176 IncludeUnusedFpmData,
177 AltFpm ? L.alternateFpmBlock() : L.mainFpmBlock());
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file implements the BitVector class.
static const int BlockSize
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Describes the layout of a stream in an MSF layout.
std::vector< support::ulittle32_t > Blocks
uint32_t getMinimumBlockCount()
LLVM_ABI Error validateSuperBlock(const SuperBlock &SB)
uint32_t getFpmIntervalLength(const MSFLayout &L)
uint64_t blockToOffset(uint64_t BlockNumber, uint64_t BlockSize)
uint64_t getMaxFileSizeFromBlockSize(uint32_t Size)
Given the specified block size, returns the maximum possible file size.
bool isValidBlockSize(uint32_t Size)
LLVM_ABI MSFStreamLayout getFpmStreamLayout(const MSFLayout &Msf, bool IncludeUnusedFpmData=false, bool AltFpm=false)
Determine the layout of the FPM stream, given the MSF layout.
uint64_t bytesToBlocks(uint64_t NumBytes, uint64_t BlockSize)
uint32_t getFirstUnreservedBlock()
uint32_t getNumFpmIntervals(uint32_t BlockSize, uint32_t NumBlocks, bool IncludeUnusedFpmData, int FpmNumber)
Given an MSF with the specified block size and number of blocks, determine how many pieces the specif...
static const char Magic[]
This is an optimization pass for GlobalISel generic memory operations.
constexpr T divideCeil(U Numerator, V Denominator)
Returns the integer ceil(Numerator / Denominator).
uint32_t alternateFpmBlock() const
ArrayRef< support::ulittle32_t > StreamSizes
uint32_t mainFpmBlock() const
ArrayRef< support::ulittle32_t > DirectoryBlocks
std::vector< ArrayRef< support::ulittle32_t > > StreamMap
support::ulittle32_t NumBlocks
support::ulittle32_t BlockSize
support::ulittle32_t Unknown1
char MagicBytes[sizeof(Magic)]
support::ulittle32_t NumDirectoryBytes
support::ulittle32_t BlockMapAddr
support::ulittle32_t FreeBlockMapBlock