isBitcodeWrapper - Return true if the given bytes are the magic bytes for an LLVM IR bitcode wrapper.
| 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). |
no outgoing calls
no test coverage detected