clang
9.0.0
|
An abstract superclass that describes a custom extension to the module/precompiled header file format. More...
#include "clang/Serialization/ModuleFileExtension.h"
Public Member Functions | |
virtual | ~ModuleFileExtension () |
virtual ModuleFileExtensionMetadata | getExtensionMetadata () const =0 |
Retrieves the metadata for this module file extension. More... | |
virtual llvm::hash_code | hashExtension (llvm::hash_code c) const |
Hash information about the presence of this extension into the module hash code. More... | |
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. More... | |
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. More... | |
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.
Definition at line 62 of file ModuleFileExtension.h.
|
virtual |
Definition at line 12 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.
Implemented in clang::TestModuleFileExtension.
|
pure virtual |
Create a new module file extension writer, which will be responsible for writing the extension contents into a particular module file.
Implemented in clang::TestModuleFileExtension.
|
pure virtual |
Retrieves the metadata for this module file extension.
Implemented in clang::TestModuleFileExtension.
|
virtual |
Hash information about the presence of this extension into the module hash code.
The module hash code 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 code.
The default implementation of this function simply returns the hash code as given, so the presence/absence of this extension does not distinguish module files.
Reimplemented in clang::TestModuleFileExtension.
Definition at line 14 of file ModuleFileExtension.cpp.