clang 20.0.0git
|
An abstract superclass that describes a custom extension to the module/precompiled header file format. More...
#include "clang/Serialization/ModuleFileExtension.h"
Public Types | |
using | ExtensionHashBuilder = llvm::HashBuilder< llvm::MD5, llvm::endianness::native > |
Hash information about the presence of this extension into the module hash. | |
Public Member Functions | |
virtual | ~ModuleFileExtension () |
virtual ModuleFileExtensionMetadata | getExtensionMetadata () const =0 |
Retrieves the metadata for this module file extension. | |
virtual void | hashExtension (ExtensionHashBuilder &HBuilder) const |
virtual std::unique_ptr< ModuleFileExtensionWriter > | createExtensionWriter (ASTWriter &Writer)=0 |
Create a new module file extension writer, which will be responsible for writing the extension contents into a particular module file. | |
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 the extension block. | |
Static Public Attributes | |
static char | ID = 0 |
Discriminator for LLVM RTTI. | |
An abstract superclass that describes a custom extension to the module/precompiled header file format.
A module file extension can introduce additional information into compiled module files (.pcm) and precompiled headers (.pch) via a custom writer that can then be accessed via a custom reader when the module file or precompiled header is loaded.
Subclasses must use LLVM RTTI for open class hierarchies.
Definition at line 65 of file ModuleFileExtension.h.
using clang::ModuleFileExtension::ExtensionHashBuilder = llvm::HashBuilder<llvm::MD5, llvm::endianness::native> |
Hash information about the presence of this extension into the module hash.
The module hash is used to distinguish different variants of a module that are incompatible. If the presence, absence, or version of the module file extension should force the creation of a separate set of module files, override this method to combine that distinguishing information into the module hash.
The default implementation of this function simply does nothing, so the presence/absence of this extension does not distinguish module files.
Definition at line 87 of file ModuleFileExtension.h.
|
virtual |
Definition at line 14 of file ModuleFileExtension.cpp.
|
pure virtual |
Create a new module file extension reader, given the metadata read from the block and the cursor into the extension block.
May return null to indicate that an extension block with the given metadata cannot be read.
|
pure virtual |
Create a new module file extension writer, which will be responsible for writing the extension contents into a particular module file.
|
pure virtual |
Retrieves the metadata for this module file extension.
|
virtual |
Definition at line 16 of file ModuleFileExtension.cpp.
|
static |
Discriminator for LLVM RTTI.
Definition at line 69 of file ModuleFileExtension.h.