summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2012-02-06 22:30:29 +0000
committerDerek Schuff <dschuff@google.com>2012-02-06 22:30:29 +0000
commit8b2dcad4b53aa9403f9a6397e35566cc78ee843c (patch)
tree4f7173ceab4188ae1bb82547d0f7e7d04c497496 /llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
parentfe3bdad393272c3f546e49eba300223c2426217e (diff)
downloadbcm5719-llvm-8b2dcad4b53aa9403f9a6397e35566cc78ee843c.tar.gz
bcm5719-llvm-8b2dcad4b53aa9403f9a6397e35566cc78ee843c.zip
Enable streaming of bitcode
This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. llvm-svn: 149918
Diffstat (limited to 'llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp')
-rw-r--r--llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
index cda0ae07602..bf068c44211 100644
--- a/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
+++ b/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
@@ -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);
OpenPOWER on IntegriCloud