9#ifndef LLVM_DEBUGINFO_MSF_MSFBUILDER_H
10#define LLVM_DEBUGINFO_MSF_MSFBUILDER_H
22class FileBufferByteStream;
126 uint32_t computeDirectoryByteSize()
const;
128 using BlockList = std::vector<uint32_t>;
138 std::vector<uint32_t> DirectoryBlocks;
139 std::vector<std::pair<uint32_t, BlockList>> StreamData;
This file defines the BumpPtrAllocator interface.
This file implements the BitVector class.
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
DenseMap< Block *, BlockRelaxAux > Blocks
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Allocate memory in an ever growing pool, as if by bump-pointer.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
StringRef - Represent a constant reference to a string, i.e.
uint32_t getNumStreams() const
Get the total number of streams in the MSF layout.
Error setBlockMapAddr(uint32_t Addr)
Request the block map to be at a specific block address.
ArrayRef< uint32_t > getStreamBlocks(uint32_t StreamIdx) const
Get the list of blocks allocated to a particular stream.
Error setDirectoryBlocksHint(ArrayRef< uint32_t > DirBlocks)
uint32_t getTotalBlockCount() const
Get the total number of blocks in the MSF file.
uint32_t getNumFreeBlocks() const
Get the total number of blocks that exist in the MSF file but are not allocated to any valid data.
BumpPtrAllocator & getAllocator()
Error setStreamSize(uint32_t Idx, uint32_t Size)
Update the size of an existing stream.
Expected< FileBufferByteStream > commit(StringRef Path, MSFLayout &Layout)
Write the MSF layout to the underlying file.
Expected< MSFLayout > generateLayout()
Finalize the layout and build the headers and structures that describe the MSF layout and can be writ...
bool isBlockFree(uint32_t Idx) const
Check whether a particular block is allocated or free.
void setFreePageMap(uint32_t Fpm)
uint32_t getStreamSize(uint32_t StreamIdx) const
Get the size of a stream by index.
static Expected< MSFBuilder > create(BumpPtrAllocator &Allocator, uint32_t BlockSize, uint32_t MinBlockCount=0, bool CanGrow=true)
Create a new MSFBuilder.
uint32_t getNumUsedBlocks() const
Get the total number of blocks that will be allocated to actual data in this MSF file.
void setUnknown1(uint32_t Unk1)
Expected< uint32_t > addStream(uint32_t Size, ArrayRef< uint32_t > Blocks)
Add a stream to the MSF file with the given size, occupying the given list of blocks.
This is an optimization pass for GlobalISel generic memory operations.