8#ifndef LLVM_CLANG_FRONTEND_TESTMODULEFILEEXTENSION_H
9#define LLVM_CLANG_FRONTEND_TESTMODULEFILEEXTENSION_H
13#include "llvm/ADT/StringRef.h"
14#include "llvm/Bitstream/BitstreamReader.h"
21 :
public llvm::RTTIExtends<TestModuleFileExtension, ModuleFileExtension> {
22 std::string BlockName;
23 unsigned MajorVersion;
24 unsigned MinorVersion;
33 void writeExtensionContents(
Sema &SemaRef,
34 llvm::BitstreamWriter &Stream)
override;
38 llvm::BitstreamCursor Stream;
50 unsigned MinorVersion,
bool Hashed,
52 : BlockName(BlockName), MajorVersion(MajorVersion),
53 MinorVersion(MinorVersion), Hashed(Hashed), UserInfo(UserInfo) {}
58 void hashExtension(ExtensionHashBuilder &HBuilder)
const override;
60 std::unique_ptr<ModuleFileExtensionWriter>
63 std::unique_ptr<ModuleFileExtensionReader>
66 const llvm::BitstreamCursor &Stream)
override;
68 std::string
str()
const;
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Reads an AST files chain containing the contents of a translation unit.
Writes an AST file containing the contents of a translation unit.
Abstract base class that reads a module file extension block from a module file.
Abstract base class that writes a module file extension block into a module file.
An abstract superclass that describes a custom extension to the module/precompiled header file format...
Sema - This implements semantic analysis and AST building for C.
A module file extension used for testing purposes.
ModuleFileExtensionMetadata getExtensionMetadata() const override
TestModuleFileExtension(StringRef BlockName, unsigned MajorVersion, unsigned MinorVersion, bool Hashed, StringRef UserInfo)
~TestModuleFileExtension() override
std::unique_ptr< ModuleFileExtensionWriter > createExtensionWriter(ASTWriter &Writer) override
void hashExtension(ExtensionHashBuilder &HBuilder) const override
std::unique_ptr< ModuleFileExtensionReader > createExtensionReader(const ModuleFileExtensionMetadata &Metadata, ASTReader &Reader, serialization::ModuleFile &Mod, const llvm::BitstreamCursor &Stream) override
Information about a module that has been loaded by the ASTReader.
The JSON file list parser is used to communicate input to InstallAPI.