summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-30 04:39:39 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-30 04:39:39 +0000
commitf7a700fd01deb5b8fc6835cba99c7251e7aafe8f (patch)
tree973c0ab7f112a8e4f62d4d65bdc741be3b98bb9d /clang/lib/Serialization/ASTWriter.cpp
parent1805b8a42f1a636f6f8c0adb276cc610ac009a2b (diff)
downloadbcm5719-llvm-f7a700fd01deb5b8fc6835cba99c7251e7aafe8f.tar.gz
bcm5719-llvm-f7a700fd01deb5b8fc6835cba99c7251e7aafe8f.zip
When writing a module file, pass the module through to the AST
writer. No functionality change. llvm-svn: 145479
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 51aadb35e5c..e225103f72a 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2791,7 +2791,7 @@ ASTWriter::~ASTWriter() {
void ASTWriter::WriteAST(Sema &SemaRef, MemorizeStatCalls *StatCalls,
const std::string &OutputFile,
- bool IsModule, StringRef isysroot) {
+ ModuleMap::Module *WritingModule, StringRef isysroot) {
WritingAST = true;
// Emit the file header.
@@ -2803,7 +2803,7 @@ void ASTWriter::WriteAST(Sema &SemaRef, MemorizeStatCalls *StatCalls,
WriteBlockInfoBlock();
Context = &SemaRef.Context;
- WriteASTCore(SemaRef, StatCalls, isysroot, OutputFile, IsModule);
+ WriteASTCore(SemaRef, StatCalls, isysroot, OutputFile, WritingModule);
Context = 0;
WritingAST = false;
@@ -2820,7 +2820,8 @@ static void AddLazyVectorDecls(ASTWriter &Writer, Vector &Vec,
void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
StringRef isysroot,
- const std::string &OutputFile, bool IsModule) {
+ const std::string &OutputFile,
+ ModuleMap::Module *WritingModule) {
using namespace llvm;
ASTContext &Context = SemaRef.Context;
@@ -3086,11 +3087,11 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
Buffer.data(), Buffer.size());
}
- WritePreprocessor(PP, IsModule);
+ WritePreprocessor(PP, WritingModule != 0);
WriteHeaderSearch(PP.getHeaderSearchInfo(), isysroot);
WriteSelectors(SemaRef);
WriteReferencedSelectorsPool(SemaRef);
- WriteIdentifierTable(PP, SemaRef.IdResolver, IsModule);
+ WriteIdentifierTable(PP, SemaRef.IdResolver, WritingModule != 0);
WriteFPPragmaOptions(SemaRef.getFPOptions());
WriteOpenCLExtensions(SemaRef);
OpenPOWER on IntegriCloud