diff options
author | Douglas Gregor <dgregor@apple.com> | 2015-12-08 22:43:32 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2015-12-08 22:43:32 +0000 |
commit | 8f64ca152985ac199ba8e2e6a94ebdba2ebd2db6 (patch) | |
tree | 7c41c0f664e7ad8e89319b7bee78a35a0ae8f3b6 /clang/lib/Serialization/ASTWriter.cpp | |
parent | d16c8065ff2e3c0030bb2e74ee6ffea80f46c7d6 (diff) | |
download | bcm5719-llvm-8f64ca152985ac199ba8e2e6a94ebdba2ebd2db6.tar.gz bcm5719-llvm-8f64ca152985ac199ba8e2e6a94ebdba2ebd2db6.zip |
Module file extensions: pass a Sema through to the extension writer.
Module file extensions are likely to need access to
Sema/Preprocessor/ASTContext, and cannot get it through other
sources.
llvm-svn: 255065
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 7d3cefed741..128935c5c73 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -3880,7 +3880,8 @@ void ASTWriter::WriteOptimizePragmaOptions(Sema &SemaRef) { Stream.EmitRecord(OPTIMIZE_PRAGMA_OPTIONS, Record); } -void ASTWriter::WriteModuleFileExtension(ModuleFileExtensionWriter &Writer) { +void ASTWriter::WriteModuleFileExtension(Sema &SemaRef, + ModuleFileExtensionWriter &Writer) { // Enter the extension block. Stream.EnterSubblock(EXTENSION_BLOCK_ID, 4); @@ -3908,7 +3909,7 @@ void ASTWriter::WriteModuleFileExtension(ModuleFileExtensionWriter &Writer) { Stream.EmitRecordWithBlob(Abbrev, Record, Buffer); // Emit the contents of the extension block. - Writer.writeExtensionContents(Stream); + Writer.writeExtensionContents(SemaRef, Stream); // Exit the extension block. Stream.ExitBlock(); @@ -4563,7 +4564,7 @@ uint64_t ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot, // Write the module file extension blocks. for (const auto &ExtWriter : ModuleFileExtensionWriters) - WriteModuleFileExtension(*ExtWriter); + WriteModuleFileExtension(SemaRef, *ExtWriter); return Signature; } |