9#ifndef LLVM_DEBUGINFO_MSF_MSFBUILDER_H
10#define LLVM_DEBUGINFO_MSF_MSFBUILDER_H
129 uint32_t computeDirectoryByteSize()
const;
131 using BlockList = std::vector<uint32_t>;
141 std::vector<uint32_t> DirectoryBlocks;
142 std::vector<std::pair<uint32_t, BlockList>> StreamData;
This file defines the BumpPtrAllocator interface.
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.
Tagged union holding either a T or a Error.
An implementation of WritableBinaryStream backed by an llvm FileOutputBuffer.
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.
LLVM_ABI uint32_t getNumStreams() const
Get the total number of streams in the MSF layout.
LLVM_ABI Error setBlockMapAddr(uint32_t Addr)
Request the block map to be at a specific block address.
LLVM_ABI ArrayRef< uint32_t > getStreamBlocks(uint32_t StreamIdx) const
Get the list of blocks allocated to a particular stream.
LLVM_ABI Error setDirectoryBlocksHint(ArrayRef< uint32_t > DirBlocks)
LLVM_ABI uint32_t getTotalBlockCount() const
Get the total number of blocks in the MSF file.
LLVM_ABI 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()
LLVM_ABI Error setStreamSize(uint32_t Idx, uint32_t Size)
Update the size of an existing stream.
LLVM_ABI Expected< FileBufferByteStream > commit(StringRef Path, MSFLayout &Layout)
Write the MSF layout to the underlying file.
LLVM_ABI Expected< MSFLayout > generateLayout()
Finalize the layout and build the headers and structures that describe the MSF layout and can be writ...
LLVM_ABI bool isBlockFree(uint32_t Idx) const
Check whether a particular block is allocated or free.
LLVM_ABI void setFreePageMap(uint32_t Fpm)
LLVM_ABI uint32_t getStreamSize(uint32_t StreamIdx) const
Get the size of a stream by index.
static LLVM_ABI Expected< MSFBuilder > create(BumpPtrAllocator &Allocator, uint32_t BlockSize, uint32_t MinBlockCount=0, bool CanGrow=true)
Create a new MSFBuilder.
LLVM_ABI uint32_t getNumUsedBlocks() const
Get the total number of blocks that will be allocated to actual data in this MSF file.
LLVM_ABI void setUnknown1(uint32_t Unk1)
LLVM_ABI 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.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.