[CIR] Untie Type and Attribute definitions (#146663)

This will allow to use Attributes and Types together in tablegen without inducing cyclic dependency.

This mirrors incubator changes from https://github.com/llvm/clangir/pull/1727
This commit is contained in:
Henrich Lauko
2025-07-02 17:01:59 +02:00
committed by GitHub
parent 242996efee
commit 3cb28e9dee
2 changed files with 15 additions and 8 deletions

View File

@@ -10,16 +10,15 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRATTRS_H #ifndef CLANG_CIR_DIALECT_IR_CIRATTRS_H
#define LLVM_CLANG_CIR_DIALECT_IR_CIRATTRS_H #define CLANG_CIR_DIALECT_IR_CIRATTRS_H
#include "clang/CIR/Dialect/IR/CIROpsEnums.h"
#include "clang/CIR/Dialect/IR/CIRTypes.h"
#include "mlir/IR/Attributes.h" #include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinAttributeInterfaces.h" #include "mlir/IR/BuiltinAttributeInterfaces.h"
#include "llvm/ADT/SmallVector.h" #include "clang/CIR/Dialect/IR/CIROpsEnums.h"
#include "clang/CIR/Interfaces/CIRTypeInterfaces.h"
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// CIR Dialect Attrs // CIR Dialect Attrs
@@ -27,15 +26,22 @@
namespace clang { namespace clang {
class FunctionDecl; class FunctionDecl;
class VarDecl;
class RecordDecl; class RecordDecl;
class VarDecl;
} // namespace clang } // namespace clang
namespace cir { namespace cir {
class ArrayType; class ArrayType;
class BoolType;
class ComplexType;
class IntType;
class MethodType;
class PointerType;
class RecordType;
class VectorType;
} // namespace cir } // namespace cir
#define GET_ATTRDEF_CLASSES #define GET_ATTRDEF_CLASSES
#include "clang/CIR/Dialect/IR/CIROpsAttributes.h.inc" #include "clang/CIR/Dialect/IR/CIROpsAttributes.h.inc"
#endif // LLVM_CLANG_CIR_DIALECT_IR_CIRATTRS_H #endif // CLANG_CIR_DIALECT_IR_CIRATTRS_H

View File

@@ -29,6 +29,7 @@
#include "clang/CIR/Dialect/IR/CIRAttrs.h" #include "clang/CIR/Dialect/IR/CIRAttrs.h"
#include "clang/CIR/Dialect/IR/CIROpsDialect.h.inc" #include "clang/CIR/Dialect/IR/CIROpsDialect.h.inc"
#include "clang/CIR/Dialect/IR/CIROpsEnums.h" #include "clang/CIR/Dialect/IR/CIROpsEnums.h"
#include "clang/CIR/Dialect/IR/CIRTypes.h"
#include "clang/CIR/Interfaces/CIRLoopOpInterface.h" #include "clang/CIR/Interfaces/CIRLoopOpInterface.h"
#include "clang/CIR/Interfaces/CIROpInterfaces.h" #include "clang/CIR/Interfaces/CIROpInterfaces.h"
#include "clang/CIR/MissingFeatures.h" #include "clang/CIR/MissingFeatures.h"