aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/GlobalModuleIndex.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-02-20 19:44:52 +0000
committerAdrian Prantl <aprantl@apple.com>2015-02-20 19:44:52 +0000
commitc4091aa74e030ca5a447b7d119a4d46d6be17de2 (patch)
tree84c43c5614a3f0f5747b7cc8f80cbd7341e1e9c5 /clang/lib/Serialization/GlobalModuleIndex.cpp
parent7035178aebc91d0ed99759919865d6745ac052e2 (diff)
downloadllvm-c4091aa74e030ca5a447b7d119a4d46d6be17de2.zip
llvm-c4091aa74e030ca5a447b7d119a4d46d6be17de2.tar.gz
llvm-c4091aa74e030ca5a447b7d119a4d46d6be17de2.tar.bz2
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 llvm-svn: 230044
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r--clang/lib/Serialization/GlobalModuleIndex.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp
index 4791388..68a23ea 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.