ΒΆinline bool SkipBitcodeWrapperHeader(
const unsigned char*& BufPtr,
const unsigned char*& BufEnd,
bool VerifyBufferSize)
inline bool SkipBitcodeWrapperHeader(
const unsigned char*& BufPtr,
const unsigned char*& BufEnd,
bool VerifyBufferSize)
Description
SkipBitcodeWrapperHeader - Some systems wrap bc files with a special header for padding or other reasons. The format of this header is: struct bc_header { uint32_t Magic; // 0x0B17C0DE uint32_t Version; // Version, currently always 0. uint32_t BitcodeOffset; // Offset to traditional bitcode file. uint32_t BitcodeSize; // Size of traditional bitcode file. ... potentially other gunk ... }; This function is called when we find a file with a matching magic number. In this case, skip down to the subsection of the file that is actually a BC file. If 'VerifyBufferSize' is true, check that the buffer is large enough to contain the whole bitcode file.
Declared at: llvm/include/llvm/Bitcode/BitcodeReader.h:239
Parameters
- const unsigned char*& BufPtr
- const unsigned char*& BufEnd
- bool VerifyBufferSize