isRawBitcode - Return true if the given bytes are the magic bytes for raw LLVM IR bitcode (without a wrapper).
| 203 | /// isRawBitcode - Return true if the given bytes are the magic bytes for |
| 204 | /// raw LLVM IR bitcode (without a wrapper). |
| 205 | inline bool isRawBitcode(const unsigned char *BufPtr, |
| 206 | const unsigned char *BufEnd) { |
| 207 | // These bytes sort of have a hidden message, but it's not in |
| 208 | // little-endian this time, and it's a little redundant. |
| 209 | return BufPtr != BufEnd && |
| 210 | BufPtr[0] == 'B' && |
| 211 | BufPtr[1] == 'C' && |
| 212 | BufPtr[2] == 0xc0 && |
| 213 | BufPtr[3] == 0xde; |
| 214 | } |
| 215 | |
| 216 | /// isBitcode - Return true if the given bytes are the magic bytes for |
| 217 | /// LLVM IR bitcode, either with or without a wrapper. |