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

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

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.h"

Inheritance diagram for clang::TestModuleFileExtension:
Inheritance graph
[legend]
Collaboration diagram for clang::TestModuleFileExtension:
Collaboration graph
[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< ModuleFileExtensionWritercreateExtensionWriter (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< ModuleFileExtensionReadercreateExtensionReader (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

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

Referenced by TestModuleFileExtension().

◆ getExtensionMetadata()

ModuleFileExtensionMetadata TestModuleFileExtension::getExtensionMetadata ( ) const
overridevirtual

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

References clang::format::hash_combine().

Referenced by TestModuleFileExtension().


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