| //===- CIRGenModule.cpp - Per-Module state for CIR generation -------------===// |
| // |
| // 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 |
| // |
| //===----------------------------------------------------------------------===// |
| // |
| // This is the internal per-translation-unit state used for CIR translation. |
| // |
| //===----------------------------------------------------------------------===// |
| |
| #include "CIRGenModule.h" |
| |
| #include "clang/AST/ASTContext.h" |
| #include "clang/AST/DeclBase.h" |
| |
| #include "mlir/IR/BuiltinOps.h" |
| #include "mlir/IR/Location.h" |
| #include "mlir/IR/MLIRContext.h" |
| |
| using namespace cir; |
| CIRGenModule::CIRGenModule(mlir::MLIRContext &context, |
| clang::ASTContext &astctx, |
| const clang::CodeGenOptions &cgo, |
| DiagnosticsEngine &diags) |
| : astCtx(astctx), langOpts(astctx.getLangOpts()), |
| theModule{mlir::ModuleOp::create(mlir::UnknownLoc())}, |
| target(astCtx.getTargetInfo()) {} |
| |
| // Emit code for a single top level declaration. |
| void CIRGenModule::buildTopLevelDecl(Decl *decl) {} |