clang 8.0.0

Classes | Public Member Functions | List of all members
clang::TestModuleFileExtension Class Reference

A module file extension used for testing purposes. More...

`#include "/work/www-prereleases/8.0.0/rc2/builddocs/llvm.src/tools/clang/lib/Frontend/TestModuleFileExtension.h"`

Inheritance diagram for clang::TestModuleFileExtension:
[legend]
Collaboration diagram for clang::TestModuleFileExtension:
[legend]

## 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...
Public Member Functions inherited from clang::ModuleFileExtension
virtual | ~ModuleFileExtension ()

## Detailed Description

A module file extension used for testing purposes.

Definition at line 21 of file TestModuleFileExtension.h.

## Constructor & Destructor Documentation

## ◆ TestModuleFileExtension()

clang::TestModuleFileExtension::TestModuleFileExtension | ( | StringRef | BlockName,
|  | unsigned | MajorVersion,
|  | unsigned | MinorVersion,
|  | bool | Hashed,
|  | StringRef | UserInfo
| ) |  |
| inline

Definition at line 47 of file TestModuleFileExtension.h.

References createExtensionReader(), createExtensionWriter(), getExtensionMetadata(), hashExtension(), and ~TestModuleFileExtension().

## ◆ ~TestModuleFileExtension()

TestModuleFileExtension::~TestModuleFileExtension | ( |  | ) |
| override

Definition at line 79 of file TestModuleFileExtension.cpp.

Referenced by TestModuleFileExtension().

## Member Function Documentation

## ◆ createExtensionReader()

std::unique_ptr< ModuleFileExtensionReader > TestModuleFileExtension::createExtensionReader | ( | const ModuleFileExtensionMetadata & | Metadata,
|  | ASTReader & | Reader,
|  | serialization::ModuleFile & | Mod,
|  | const llvm::BitstreamCursor & | Stream
| ) |  |
| override 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.

Implements clang::ModuleFileExtension.

Definition at line 104 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().

## ◆ createExtensionWriter()

std::unique_ptr< ModuleFileExtensionWriter > TestModuleFileExtension::createExtensionWriter | ( | ASTWriter & | Writer | ) |
| override virtual

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 99 of file TestModuleFileExtension.cpp.

Referenced by TestModuleFileExtension().

## ◆ getExtensionMetadata()

ModuleFileExtensionMetadata TestModuleFileExtension::getExtensionMetadata | ( |  | ) | const
| override virtual

Retrieves the metadata for this module file extension.

Implements clang::ModuleFileExtension.

Definition at line 82 of file TestModuleFileExtension.cpp.

Referenced by TestModuleFileExtension().

## ◆ hashExtension()

llvm::hash_code TestModuleFileExtension::hashExtension | ( | llvm::hash_code | c | ) | const
| override 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 from clang::ModuleFileExtension.

Definition at line 86 of file TestModuleFileExtension.cpp.

References clang::format::hash_combine().

Referenced by TestModuleFileExtension().

The documentation for this class was generated from the following files:

- lib/Frontend/TestModuleFileExtension.h
- lib/Frontend/TestModuleFileExtension.cpp