MCPcopy Create free account
hub / github.com/GANGE666/xVMP / isBitcodeWrapper

Function isBitcodeWrapper

src/include/llvm/Bitcode/BitcodeReader.h:192–201  ·  view source on GitHub ↗

isBitcodeWrapper - Return true if the given bytes are the magic bytes for an LLVM IR bitcode wrapper.

Source from the content-addressed store, hash-verified

190 /// isBitcodeWrapper - Return true if the given bytes are the magic bytes
191 /// for an LLVM IR bitcode wrapper.
192 inline bool isBitcodeWrapper(const unsigned char *BufPtr,
193 const unsigned char *BufEnd) {
194 // See if you can find the hidden message in the magic bytes :-).
195 // (Hint: it's a little-endian encoding.)
196 return BufPtr != BufEnd &&
197 BufPtr[0] == 0xDE &&
198 BufPtr[1] == 0xC0 &&
199 BufPtr[2] == 0x17 &&
200 BufPtr[3] == 0x0B;
201 }
202
203 /// isRawBitcode - Return true if the given bytes are the magic bytes for
204 /// raw LLVM IR bitcode (without a wrapper).

Callers 3

openBitcodeFileFunction · 0.85
initStreamFunction · 0.85
isBitcodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected