mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Enable streaming of bitcode
This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149918 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -483,13 +483,13 @@ static int AnalyzeBitcode() {
|
||||
if (MemBuf->getBufferSize() & 3)
|
||||
return Error("Bitcode stream should be a multiple of 4 bytes in length");
|
||||
|
||||
unsigned char *BufPtr = (unsigned char *)MemBuf->getBufferStart();
|
||||
unsigned char *EndBufPtr = BufPtr+MemBuf->getBufferSize();
|
||||
const unsigned char *BufPtr = (unsigned char *)MemBuf->getBufferStart();
|
||||
const unsigned char *EndBufPtr = BufPtr+MemBuf->getBufferSize();
|
||||
|
||||
// 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, EndBufPtr))
|
||||
if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr))
|
||||
if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr, true))
|
||||
return Error("Invalid bitcode wrapper header");
|
||||
|
||||
BitstreamReader StreamFile(BufPtr, EndBufPtr);
|
||||
|
||||
Reference in New Issue
Block a user