14#ifndef LLVM_CLANG_CIR_CIRGENERATOR_H
15#define LLVM_CLANG_CIR_CIRGENERATOR_H
20#include "llvm/ADT/IntrusiveRefCntPtr.h"
21#include "llvm/Support/VirtualFileSystem.h"
27class DiagnosticsEngine;
38 virtual void anchor();
46 unsigned handlingTopLevelDecls;
51 struct HandlingTopLevelDeclRAII {
54 HandlingTopLevelDeclRAII(
CIRGenerator &self,
bool emitDeferred =
true)
55 : self{self}, emitDeferred{emitDeferred} {
56 ++self.handlingTopLevelDecls;
58 ~HandlingTopLevelDeclRAII() {
59 unsigned Level = --self.handlingTopLevelDecls;
60 if (Level == 0 && emitDeferred)
67 std::unique_ptr<clang::CIRGen::CIRGenModule>
cgm;
void HandleTagDeclDefinition(clang::TagDecl *d) override
HandleTagDeclDefinition - This callback is invoked each time a TagDecl to (e.g.
mlir::ModuleOp getModule() const
const mlir::MLIRContext & getMLIRContext() const
std::unique_ptr< clang::CIRGen::CIRGenModule > cgm
void HandleTranslationUnit(clang::ASTContext &astContext) override
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been par...
bool verifyModule() const
void HandleVTable(clang::CXXRecordDecl *rd) override
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given...
bool HandleTopLevelDecl(clang::DeclGroupRef group) override
HandleTopLevelDecl - Handle the specified top-level declaration.
void CompleteTentativeDefinition(clang::VarDecl *d) override
CompleteTentativeDefinition - Callback invoked at the end of a translation unit to notify the consume...
void HandleTagDeclRequiredDefinition(const clang::TagDecl *D) override
This callback is invoked the first time each TagDecl is required to be complete.
void HandleInlineFunctionDefinition(clang::FunctionDecl *d) override
This callback is invoked each time an inline (method or friend) function definition in a class is com...
void HandleCXXStaticMemberVarInstantiation(clang::VarDecl *D) override
HandleCXXStaticMemberVarInstantiation - Tell the consumer that this.
std::unique_ptr< mlir::MLIRContext > mlirContext
void Initialize(clang::ASTContext &astContext) override
Initialize - This is called to initialize the consumer, providing the ASTContext.
mlir::MLIRContext & getMLIRContext()
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This class organizes the cross-function state that is used while generating CIR code.
Represents a C++ struct/union/class.
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
Concrete class used by the front-end to report problems and issues.
Represents a function declaration or definition.
Represents the declaration of a struct/union/class/enum.
Represents a variable declaration or definition.
The JSON file list parser is used to communicate input to InstallAPI.