search for: skipbitcodewrapperhead

Displaying 4 results from an estimated 4 matches for "skipbitcodewrapperhead".

2020 Aug 28
4
End-to-end -fembed-bitcode .llvmbc and .llvmcmd
...signed char *>(Buffer.getBufferStart()); >> const unsigned char *EndBufPtr = >> reinterpret_cast<const unsigned char *>(Buffer.getBufferEnd()); >> if (isBitcodeWrapper(BufPtr, EndBufPtr)) { >> const unsigned char *FixedBufPtr = BufPtr; >> if (SkipBitcodeWrapperHeader(FixedBufPtr, EndBufPtr, true)) >> report_fatal_error("Invalid bitcode wrapper"); >> return EndBufPtr - BufPtr; >> } >> >> if (!isRawBitcode(BufPtr, EndBufPtr)) >> report_fatal_error("Invalid magic bytes; not a bitcode file?&quot...
2020 Aug 28
2
End-to-end -fembed-bitcode .llvmbc and .llvmcmd
...*BufPtr = reinterpret_cast<const unsigned char *>(Buffer.getBufferStart()); const unsigned char *EndBufPtr = reinterpret_cast<const unsigned char *>(Buffer.getBufferEnd()); if (isBitcodeWrapper(BufPtr, EndBufPtr)) { const unsigned char *FixedBufPtr = BufPtr; if (SkipBitcodeWrapperHeader(FixedBufPtr, EndBufPtr, true)) report_fatal_error("Invalid bitcode wrapper"); return EndBufPtr - BufPtr; } if (!isRawBitcode(BufPtr, EndBufPtr)) report_fatal_error("Invalid magic bytes; not a bitcode file?"); BitstreamCursor Reader(Buffer); Reader.Read(...
2014 Dec 19
2
[LLVMdev] [Patches][RFC] What to do about bitcode streaming.
Hi Rafael, Would you mind waiting for Derek to come back from vacation to discuss this? We do use this code and could improve how it's used and tested within LLVM. Derek is the best person to discuss this, he'll be back in mid-January. Thanks, JF On Fri, Dec 19, 2014 at 6:41 AM, Rafael EspĂ­ndola < rafael.espindola at gmail.com> wrote: > > > I CC'ed llvmdev to put a
2014 Dec 19
2
[LLVMdev] [Patches][RFC] What to do about bitcode streaming.
...d too closely, but just looks different from what it used to do... + const uint8_t *OrigBufPtr = BufPtr; // If we have a wrapper header, parse it and ignore the non-bc file contents. // The magic number is 0x0B17C0DE stored in little endian. if (isBitcodeWrapper(BufPtr, BufEnd)) if (SkipBitcodeWrapperHeader(BufPtr, BufEnd, true)) return Error(BitcodeError::InvalidBitcodeWrapperHeader); //... - if (isBitcodeWrapper(buf, buf + 4)) { - const unsigned char *bitcodeStart = buf; - const unsigned char *bitcodeEnd = buf + 16; - SkipBitcodeWrapperHeader(bitcodeStart, bitcodeEnd, false); -...