Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TClingRdictModuleFileExtension.h
Go to the documentation of this file.
1/// \file TClingRdictModuleFileExtension.h
2///
3/// \brief The file contains facilities to work with C++ module files extensions
4/// used to store rdict files.
5///
6/// \author Vassil Vassilev <vvasilev@cern.ch>
7///
8/// \date May, 2019
9///
10/*************************************************************************
11 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
12 * All rights reserved. *
13 * *
14 * For the licensing terms see $ROOTSYS/LICENSE. *
15 * For the list of contributors see $ROOTSYS/README/CREDITS. *
16 *************************************************************************/
17
18#ifndef ROOT_CLING_RDICT_MODULE_FILE_EXTENSION_H
19#define ROOT_CLING_RDICT_MODULE_FILE_EXTENSION_H
20
21#include "clang/Serialization/ModuleFileExtension.h"
22
23#include "llvm/Bitstream/BitstreamReader.h"
24
25/// A module file extension used for testing purposes.
26class TClingRdictModuleFileExtension : public clang::ModuleFileExtension {
27
28 class Writer : public clang::ModuleFileExtensionWriter {
29 public:
30 Writer(ModuleFileExtension *Ext) : ModuleFileExtensionWriter(Ext) {}
31 ~Writer() override;
32
33 void writeExtensionContents(clang::Sema &SemaRef, llvm::BitstreamWriter &Stream) override;
34 };
35
36 class Reader : public clang::ModuleFileExtensionReader {
37 llvm::BitstreamCursor Stream;
38
39 public:
40 ~Reader() override;
41
42 Reader(clang::ModuleFileExtension *Ext, clang::ASTReader &Reader, clang::serialization::ModuleFile &Mod,
43 const llvm::BitstreamCursor &InStream);
44 };
45
46public:
48
50
51 clang::ModuleFileExtensionMetadata getExtensionMetadata() const override;
52
53 llvm::hash_code hashExtension(llvm::hash_code Code) const override;
54
55 std::unique_ptr<clang::ModuleFileExtensionWriter> createExtensionWriter(clang::ASTWriter &Writer) override;
56
57 std::unique_ptr<clang::ModuleFileExtensionReader>
58 createExtensionReader(const clang::ModuleFileExtensionMetadata &Metadata, clang::ASTReader &Reader,
59 clang::serialization::ModuleFile &Mod, const llvm::BitstreamCursor &Stream) override;
60};
61
62#endif
void writeExtensionContents(clang::Sema &SemaRef, llvm::BitstreamWriter &Stream) override
A module file extension used for testing purposes.
std::unique_ptr< clang::ModuleFileExtensionReader > createExtensionReader(const clang::ModuleFileExtensionMetadata &Metadata, clang::ASTReader &Reader, clang::serialization::ModuleFile &Mod, const llvm::BitstreamCursor &Stream) override
clang::ModuleFileExtensionMetadata getExtensionMetadata() const override
std::unique_ptr< clang::ModuleFileExtensionWriter > createExtensionWriter(clang::ASTWriter &Writer) override
llvm::hash_code hashExtension(llvm::hash_code Code) const override