llvm::isBitcode

isBitcode - Return true if the given bytes are the magic bytes for LLVM IR bitcode, either with or without a wrapper.

Synopsis

Declared in <llvm/Bitcode/BitcodeReader.h>

bool
isBitcode(
    unsigned char const* BufPtr,
    unsigned char const* BufEnd);

Return Value

True if the buffer starts with wrapped or raw bitcode magic.

Parameters

NameDescription
BufPtrPointer to the start of the buffer.
BufEndPointer one past the end of the buffer.