10 #ifndef LLVM_DEBUGINFO_MSF_MSFCOMMON_H 11 #define LLVM_DEBUGINFO_MSF_MSFCOMMON_H 24 static 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'};
56 assert(SB->FreeBlockMapBlock == 1 || SB->FreeBlockMapBlock == 2);
57 return SB->FreeBlockMapBlock;
62 return 3U - mainFpmBlock();
69 std::vector<ArrayRef<support::ulittle32_t>>
StreamMap;
81 std::vector<support::ulittle32_t>
Blocks;
88 bool IncludeUnusedFpmData =
false,
134 bool IncludeUnusedFpmData,
int FpmNumber) {
135 assert(FpmNumber == 1 || FpmNumber == 2);
136 if (IncludeUnusedFpmData) {
141 return divideCeil(NumBlocks - FpmNumber, BlockSize);
150 bool IncludeUnusedFpmData =
false,
151 bool AltFpm =
false) {
153 IncludeUnusedFpmData,
162 #endif // LLVM_DEBUGINFO_MSF_MSFCOMMON_H char MagicBytes[sizeof(Magic)]
This class represents lattice values for constants.
Error validateSuperBlock(const SuperBlock &SB)
uint64_t blockToOffset(uint64_t BlockNumber, uint64_t BlockSize)
uint32_t getMinimumBlockCount()
Describes the layout of a stream in an MSF layout.
MSFStreamLayout getFpmStreamLayout(const MSFLayout &Msf, bool IncludeUnusedFpmData=false, bool AltFpm=false)
Determine the layout of the FPM stream, given the MSF layout.
uint32_t getFpmIntervalLength(const MSFLayout &L)
std::vector< support::ulittle32_t > Blocks
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...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
support::ulittle32_t BlockSize
support::ulittle32_t BlockMapAddr
static const char Magic[]
support::ulittle32_t Unknown1
uint32_t alternateFpmBlock() const
ArrayRef< support::ulittle32_t > DirectoryBlocks
uint64_t bytesToBlocks(uint64_t NumBytes, uint64_t BlockSize)
uint32_t mainFpmBlock() const
uint64_t divideCeil(uint64_t Numerator, uint64_t Denominator)
Returns the integer ceil(Numerator / Denominator).
std::vector< ArrayRef< support::ulittle32_t > > StreamMap
ArrayRef< support::ulittle32_t > StreamSizes
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
support::ulittle32_t FreeBlockMapBlock
Lightweight error class with error context and mandatory checking.
bool isValidBlockSize(uint32_t Size)
uint32_t getFirstUnreservedBlock()
support::ulittle32_t NumDirectoryBytes
support::ulittle32_t NumBlocks