#include "llvm/BinaryFormat/Magic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/MemoryBuffer.h"
#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
#else
#include <io.h>
#endif
usingnamespacellvm;
usingnamespacellvm::support::endian;
usingnamespacellvm::sys::fs;
template <size_t N>
static bool startswith(StringRef Magic, const char (&S)[N]) { … }
file_magic llvm::identify_magic(StringRef Magic) { … }
std::error_code llvm::identify_magic(const Twine &Path, file_magic &Result) { … }