================
@@ -0,0 +1,76 @@
+//===- CIRLowerContext.h - Context to lower CIR -----------------*- 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Partially mimics AST/ASTContext.h. The main difference is that this is
+// adapted to operate on the CIR dialect.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_LIB_CIR_DIALECT_TRANSFORMS_TARGETLOWERING_CIRLowerContext_H
+#define LLVM_CLANG_LIB_CIR_DIALECT_TRANSFORMS_TARGETLOWERING_CIRLowerContext_H
+
+#include "mlir/IR/MLIRContext.h"
+#include "mlir/IR/Types.h"
+#include "mlir/Interfaces/DataLayoutInterfaces.h"
+#include "clang/AST/ASTContext.h"
+#include "clang/AST/Type.h"
+#include "clang/Basic/TargetInfo.h"
+#include "llvm/ADT/IntrusiveRefCntPtr.h"
+
+namespace cir {
+
+// FIXME(cir): Most of this is type-related information that should already be
+// embedded into CIR. Maybe we can move this to an MLIR interface.
+class CIRLowerContext : public llvm::RefCountedBase<CIRLowerContext> {
+
+private:
+  mutable llvm::SmallVector<mlir::Type, 0> types;
----------------
Lancern wrote:

Any specific reason to choose an inline capacity of 0?

https://github.com/llvm/llvm-project/pull/182645
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to