9#ifndef LLVM_CLANG_SERIALIZATION_MODULEFILEEXTENSION_H
10#define LLVM_CLANG_SERIALIZATION_MODULEFILEEXTENSION_H
12#include "llvm/Support/ExtensibleRTTI.h"
13#include "llvm/Support/HashBuilder.h"
14#include "llvm/Support/MD5.h"
30namespace serialization {
66 :
public llvm::RTTIExtends<ModuleFileExtension, llvm::RTTIRoot> {
88 llvm::HashBuilder<llvm::MD5, llvm::endianness::native>;
94 virtual std::unique_ptr<ModuleFileExtensionWriter>
103 virtual std::unique_ptr<ModuleFileExtensionReader>
106 const llvm::BitstreamCursor &Stream) = 0;
116 : Extension(Extension) { }
131 llvm::BitstreamWriter &Stream) = 0;
143 : Extension(Extension) { }
Reads an AST files chain containing the contents of a translation unit.
Writes an AST file containing the contents of a translation unit.
Abstract base class that reads a module file extension block from a module file.
ModuleFileExtension * getExtension() const
Retrieve the module file extension with which this reader is associated.
virtual ~ModuleFileExtensionReader()
ModuleFileExtensionReader(ModuleFileExtension *Extension)
Abstract base class that writes a module file extension block into a module file.
virtual void writeExtensionContents(Sema &SemaRef, llvm::BitstreamWriter &Stream)=0
Write the contents of the extension block into the given bitstream.
ModuleFileExtension * getExtension() const
Retrieve the module file extension with which this writer is associated.
virtual ~ModuleFileExtensionWriter()
ModuleFileExtensionWriter(ModuleFileExtension *Extension)
An abstract superclass that describes a custom extension to the module/precompiled header file format...
virtual std::unique_ptr< ModuleFileExtensionReader > createExtensionReader(const ModuleFileExtensionMetadata &Metadata, ASTReader &Reader, serialization::ModuleFile &Mod, const llvm::BitstreamCursor &Stream)=0
Create a new module file extension reader, given the metadata read from the block and the cursor into...
static char ID
Discriminator for LLVM RTTI.
llvm::HashBuilder< llvm::MD5, llvm::endianness::native > ExtensionHashBuilder
Hash information about the presence of this extension into the module hash.
virtual void hashExtension(ExtensionHashBuilder &HBuilder) const
virtual ModuleFileExtensionMetadata getExtensionMetadata() const =0
Retrieves the metadata for this module file extension.
virtual std::unique_ptr< ModuleFileExtensionWriter > createExtensionWriter(ASTWriter &Writer)=0
Create a new module file extension writer, which will be responsible for writing the extension conten...
virtual ~ModuleFileExtension()
Sema - This implements semantic analysis and AST building for C.
Information about a module that has been loaded by the ASTReader.
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.