10 #ifndef LLVM_DEBUGINFO_MSF_MSFBUILDER_H
11 #define LLVM_DEBUGINFO_MSF_MSFBUILDER_H
123 uint32_t computeDirectoryByteSize()
const;
125 typedef std::vector<uint32_t> BlockList;
136 std::vector<uint32_t> DirectoryBlocks;
137 std::vector<std::pair<uint32_t, BlockList>> StreamData;
142 #endif // LLVM_DEBUGINFO_MSF_MSFBUILDER_H
void setFreePageMap(uint32_t Fpm)
uint32_t getStreamSize(uint32_t StreamIdx) const
Get the size of a stream by index.
uint32_t getNumFreeBlocks() const
Get the total number of blocks that exist in the MSF file but are not allocated to any valid data...
Error setBlockMapAddr(uint32_t Addr)
Request the block map to be at a specific block address.
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
Tagged union holding either a T or a Error.
uint32_t getTotalBlockCount() const
Get the total number of blocks in the MSF file.
uint32_t getNumStreams() const
Get the total number of streams in the MSF layout.
Error setDirectoryBlocksHint(ArrayRef< uint32_t > DirBlocks)
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Allocate memory in an ever growing pool, as if by bump-pointer.
Expected< MSFLayout > build()
Finalize the layout and build the headers and structures that describe the MSF layout and can be writ...
Error setStreamSize(uint32_t Idx, uint32_t Size)
Update the size of an existing stream.
uint32_t getNumUsedBlocks() const
Get the total number of blocks that will be allocated to actual data in this MSF file.
ArrayRef< uint32_t > getStreamBlocks(uint32_t StreamIdx) const
Get the list of blocks allocated to a particular stream.
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.
void setUnknown1(uint32_t Unk1)
static Expected< MSFBuilder > create(BumpPtrAllocator &Allocator, uint32_t BlockSize, uint32_t MinBlockCount=0, bool CanGrow=true)
Create a new MSFBuilder.
Lightweight error class with error context and mandatory checking.
bool isBlockFree(uint32_t Idx) const
Check whether a particular block is allocated or free.
BumpPtrAllocator & getAllocator()