13#ifndef LLVM_CLANG_LIB_CIR_CODEGEN_CIRGENMODULE_H
14#define LLVM_CLANG_LIB_CIR_CODEGEN_CIRGENMODULE_H
20#include "mlir/IR/Builders.h"
21#include "mlir/IR/BuiltinOps.h"
22#include "mlir/IR/MLIRContext.h"
24#include "llvm/ADT/StringRef.h"
59 mlir::ModuleOp theModule;
68 mlir::ModuleOp
getModule()
const {
return theModule; }
86 mlir::Operation *op =
nullptr);
89 bool isTentative =
false);
99 "ClangIR code gen Not Yet Implemented: %0: %1");
100 return diags.
Report(loc, diagID) << feature << name;
105 template <
typename T>
Defines the SourceManager interface.
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.
DiagnosticBuilder errorNYI(SourceLocation, llvm::StringRef)
Helpers to emit "not yet implemented" error diagnostics.
clang::ASTContext & getASTContext() const
void emitTopLevelDecl(clang::Decl *decl)
DiagnosticBuilder errorNYI(SourceRange loc, llvm::StringRef feature, const T &name)
CIRGenBuilderTy & getBuilder()
void emitGlobalDefinition(clang::GlobalDecl gd, mlir::Operation *op=nullptr)
void emitGlobalVarDefinition(const clang::VarDecl *vd, bool isTentative=false)
mlir::Location getLoc(clang::SourceLocation cLoc)
Helpers to convert the presumed location of Clang's SourceLocation to an MLIR Location.
mlir::ModuleOp getModule() const
mlir::MLIRContext & getMLIRContext()
void emitGlobal(clang::GlobalDecl gd)
Emit code for a single global function or variable declaration.
DiagnosticBuilder errorNYI(SourceLocation loc, llvm::StringRef feature, const T &name)
void emitGlobalFunctionDefinition(clang::GlobalDecl gd, mlir::Operation *op)
This class organizes the cross-module state that is used while lowering AST types to CIR types.
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
Decl - This represents one declaration (or definition), e.g.
A little helper class used to produce diagnostics.
Concrete class used by the front-end to report problems and issues.
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
unsigned getCustomDiagID(Level L, const char(&FormatString)[N])
Return an ID for a diagnostic with the specified format string and level.
GlobalDecl - represents a global declaration.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Encodes a location in the source.
A trivial tuple used to represent a source range.
SourceLocation getBegin() const
Exposes information about the current target.
Represents a variable declaration or definition.
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
This structure provides a set of types that are commonly used during IR emission.