//===-- ModuleFileExtension.h - Module File Extensions ----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_SERIALIZATION_MODULEFILEEXTENSION_H #define LLVM_CLANG_SERIALIZATION_MODULEFILEEXTENSION_H #include "llvm/Support/ExtensibleRTTI.h" #include "llvm/Support/HashBuilder.h" #include "llvm/Support/MD5.h" #include <memory> #include <string> namespace llvm { class BitstreamCursor; class BitstreamWriter; class raw_ostream; } namespace clang { class ASTReader; class ASTWriter; class Sema; namespace serialization { class ModuleFile; } // end namespace serialization /// Metadata for a module file extension. struct ModuleFileExtensionMetadata { … }; class ModuleFileExtensionReader; class ModuleFileExtensionWriter; /// 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. /// /// Subclasses must use LLVM RTTI for open class hierarchies. class ModuleFileExtension : public llvm::RTTIExtends<ModuleFileExtension, llvm::RTTIRoot> { … }; /// Abstract base class that writes a module file extension block into /// a module file. class ModuleFileExtensionWriter { … }; /// Abstract base class that reads a module file extension block from /// a module file. /// /// Subclasses class ModuleFileExtensionReader { … }; } // end namespace clang #endif // LLVM_CLANG_SERIALIZATION_MODULEFILEEXTENSION_H