clang
9.0.0
|
A module file extension used for testing purposes. More...
#include "/work/llvm-www-releases/9.0.0/docsbuild/llvm.src/tools/clang/lib/Frontend/TestModuleFileExtension.h"
Public Member Functions | |
TestModuleFileExtension (StringRef BlockName, unsigned MajorVersion, unsigned MinorVersion, bool Hashed, StringRef UserInfo) | |
~TestModuleFileExtension () override | |
ModuleFileExtensionMetadata | getExtensionMetadata () const override |
Retrieves the metadata for this module file extension. More... | |
llvm::hash_code | hashExtension (llvm::hash_code Code) const override |
Hash information about the presence of this extension into the module hash code. More... | |
std::unique_ptr< ModuleFileExtensionWriter > | createExtensionWriter (ASTWriter &Writer) override |
Create a new module file extension writer, which will be responsible for writing the extension contents into a particular module file. More... | |
std::unique_ptr< ModuleFileExtensionReader > | createExtensionReader (const ModuleFileExtensionMetadata &Metadata, ASTReader &Reader, serialization::ModuleFile &Mod, const llvm::BitstreamCursor &Stream) override |
Create a new module file extension reader, given the metadata read from the block and the cursor into the extension block. More... | |
![]() | |
virtual | ~ModuleFileExtension () |
A module file extension used for testing purposes.
Definition at line 20 of file TestModuleFileExtension.h.
|
inline |
Definition at line 46 of file TestModuleFileExtension.h.
References createExtensionReader(), createExtensionWriter(), getExtensionMetadata(), hashExtension(), and ~TestModuleFileExtension().
|
override |
Definition at line 87 of file TestModuleFileExtension.cpp.
Referenced by TestModuleFileExtension().
|
overridevirtual |
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.
Implements clang::ModuleFileExtension.
Definition at line 112 of file TestModuleFileExtension.cpp.
References clang::ModuleFileExtensionMetadata::BlockName, clang::ASTReader::getDiags(), clang::serialization::ModuleFile::ImportLoc, clang::ModuleFileExtensionMetadata::MajorVersion, clang::ModuleFileExtensionMetadata::MinorVersion, and clang::DiagnosticsEngine::Report().
Referenced by TestModuleFileExtension().
|
overridevirtual |
Create a new module file extension writer, which will be responsible for writing the extension contents into a particular module file.
Implements clang::ModuleFileExtension.
Definition at line 107 of file TestModuleFileExtension.cpp.
Referenced by TestModuleFileExtension().
|
overridevirtual |
Retrieves the metadata for this module file extension.
Implements clang::ModuleFileExtension.
Definition at line 90 of file TestModuleFileExtension.cpp.
Referenced by TestModuleFileExtension().
|
overridevirtual |
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 from clang::ModuleFileExtension.
Definition at line 94 of file TestModuleFileExtension.cpp.
References clang::format::hash_combine().
Referenced by TestModuleFileExtension().