diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-02-24 04:25:59 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-02-24 04:25:59 +0000 |
commit | fc360dc30be41b7ea941ae39fd8a847b6e0263c5 (patch) | |
tree | a1ff1d6476ea33713c9ed4d5e18575690322f9d5 /clang/lib/Serialization/GlobalModuleIndex.cpp | |
parent | c109102ecb80c06375688d374fdc17c04cd7d562 (diff) | |
download | bcm5719-llvm-fc360dc30be41b7ea941ae39fd8a847b6e0263c5.tar.gz bcm5719-llvm-fc360dc30be41b7ea941ae39fd8a847b6e0263c5.zip |
Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.
rdar://problem/19104245
This reapplies r230044 with a fixed configure+make build and updated
dependencies. Take 3.
llvm-svn: 230305
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r-- | clang/lib/Serialization/GlobalModuleIndex.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp index 47913880454..68a23ea870d 100644 --- a/clang/lib/Serialization/GlobalModuleIndex.cpp +++ b/clang/lib/Serialization/GlobalModuleIndex.cpp @@ -15,6 +15,7 @@ #include "clang/Basic/FileManager.h" #include "clang/Lex/HeaderSearch.h" #include "clang/Serialization/ASTBitCodes.h" +#include "clang/Serialization/ASTReader.h" #include "clang/Serialization/GlobalModuleIndex.h" #include "clang/Serialization/Module.h" #include "llvm/ADT/DenseMap.h" @@ -501,8 +502,8 @@ bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) { // Initialize the input stream llvm::BitstreamReader InStreamFile; - InStreamFile.init((const unsigned char *)(*Buffer)->getBufferStart(), - (const unsigned char *)(*Buffer)->getBufferEnd()); + ASTReader::InitStreamFileWithModule((*Buffer)->getMemBufferRef(), + InStreamFile); llvm::BitstreamCursor InStream(InStreamFile); // Sniff for the signature. |