llvm::identify_magic

Identify the type of a binary file based on how magical it is.

Synopsis

Declared in <llvm/BinaryFormat/Magic.h>

file_magic
identify_magic(StringRef magic);

Return Value

The identified file_magic kind for the given bytes.

Parameters

NameDescription
magicLeading bytes of the file used for magic identification.