[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 06:15:21 PDT 2024


================
@@ -0,0 +1,27 @@
+//===--- CIRGenTypeCache.h - Commonly used LLVM types and info -*- 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This structure provides a set of common types useful during CIR emission.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_LIB_CIR_CIRGENTYPECACHE_H
+#define LLVM_CLANG_LIB_CIR_CIRGENTYPECACHE_H
+
+namespace cir {
+
+/// This structure provides a set of types that are commonly used
+/// during IR emission. It's initialized once in CodeGenModule's
+/// constructor and then copied around into new CIRGenFunction's.
+struct CIRGenTypeCache {
+  CIRGenTypeCache() {}
----------------
AaronBallman wrote:

```suggestion
  CIRGenTypeCache() = default;
```
Is the constructor even needed?

https://github.com/llvm/llvm-project/pull/91007


More information about the cfe-commits mailing list