| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| InheritParentConfig: true | ||
| Checks: > | ||
| -misc-const-correctness, | ||
| -llvm-header-guard, | ||
| bugprone-argument-comment, | ||
| bugprone-assert-side-effect, | ||
| bugprone-branch-clone, | ||
| bugprone-copy-constructor-init, | ||
| bugprone-dangling-handle, | ||
| bugprone-dynamic-static-initializers, | ||
| bugprone-macro-parentheses, | ||
| bugprone-macro-repeated-side-effects, | ||
| bugprone-misplaced-widening-cast, | ||
| bugprone-move-forwarding-reference, | ||
| bugprone-multiple-statement-macro, | ||
| bugprone-suspicious-semicolon, | ||
| bugprone-swapped-arguments, | ||
| bugprone-terminating-continue, | ||
| bugprone-unused-raii, | ||
| bugprone-unused-return-value, | ||
| misc-redundant-expression, | ||
| misc-static-assert, | ||
| misc-unused-using-decls, | ||
| modernize-use-bool-literals, | ||
| modernize-loop-convert, | ||
| modernize-make-unique, | ||
| modernize-raw-string-literal, | ||
| modernize-use-equals-default, | ||
| modernize-use-default-member-init, | ||
| modernize-use-emplace, | ||
| modernize-use-nullptr, | ||
| modernize-use-override, | ||
| modernize-use-using, | ||
| performance-for-range-copy, | ||
| performance-implicit-conversion-in-loop, | ||
| performance-inefficient-algorithm, | ||
| performance-inefficient-vector-operation, | ||
| performance-move-const-arg, | ||
| performance-no-automatic-move, | ||
| performance-trivially-destructible, | ||
| performance-unnecessary-copy-initialization, | ||
| performance-unnecessary-value-param, | ||
| readability-avoid-const-params-in-decls, | ||
| readability-const-return-type, | ||
| readability-container-size-empty, | ||
| readability-identifier-naming, | ||
| readability-inconsistent-declaration-parameter-name, | ||
| readability-misleading-indentation, | ||
| readability-redundant-control-flow, | ||
| readability-redundant-smartptr-get, | ||
| readability-simplify-boolean-expr, | ||
| readability-simplify-subscript-expr, | ||
| readability-use-anyofallof | ||
| CheckOptions: | ||
| - key: readability-identifier-naming.MemberCase | ||
| value: camelBack | ||
| - key: readability-identifier-naming.ParameterCase | ||
| value: camelBack | ||
| - key: readability-identifier-naming.VariableCase | ||
| value: camelBack |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| //===- CIRGenerator.h - CIR Generation from Clang AST ---------------------===// | ||
| // | ||
| // 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 file declares a simple interface to perform CIR generation from Clang | ||
| // AST | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #ifndef LLVM_CLANG_CIR_CIRGENERATOR_H | ||
| #define LLVM_CLANG_CIR_CIRGENERATOR_H | ||
|
|
||
| #include "clang/AST/ASTConsumer.h" | ||
| #include "clang/Basic/CodeGenOptions.h" | ||
|
|
||
| #include "llvm/ADT/IntrusiveRefCntPtr.h" | ||
| #include "llvm/Support/VirtualFileSystem.h" | ||
|
|
||
| #include <memory> | ||
|
|
||
| namespace clang { | ||
| class DeclGroupRef; | ||
| class DiagnosticsEngine; | ||
| } // namespace clang | ||
|
|
||
| namespace mlir { | ||
| class MLIRContext; | ||
| } // namespace mlir | ||
| namespace cir { | ||
| class CIRGenModule; | ||
|
|
||
| class CIRGenerator : public clang::ASTConsumer { | ||
| virtual void anchor(); | ||
| clang::DiagnosticsEngine &diags; | ||
| clang::ASTContext *astCtx; | ||
| // Only used for debug info. | ||
| llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs; | ||
|
|
||
| const clang::CodeGenOptions &codeGenOpts; | ||
|
|
||
| protected: | ||
| std::unique_ptr<mlir::MLIRContext> mlirCtx; | ||
| std::unique_ptr<CIRGenModule> cgm; | ||
|
|
||
| public: | ||
| CIRGenerator(clang::DiagnosticsEngine &diags, | ||
| llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs, | ||
| const clang::CodeGenOptions &cgo); | ||
| ~CIRGenerator() override; | ||
| void Initialize(clang::ASTContext &astCtx) override; | ||
| bool HandleTopLevelDecl(clang::DeclGroupRef group) override; | ||
| }; | ||
|
|
||
| } // namespace cir | ||
|
|
||
| #endif // LLVM_CLANG_CIR_CIRGENERATOR_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| //===---- CIRGenAction.h - CIR Code Generation Frontend Action -*- 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 | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #ifndef LLVM_CLANG_CIR_CIRGENACTION_H | ||
| #define LLVM_CLANG_CIR_CIRGENACTION_H | ||
|
|
||
| #include "clang/Frontend/FrontendAction.h" | ||
|
|
||
| #include "mlir/IR/BuiltinOps.h" | ||
| #include "mlir/IR/OwningOpRef.h" | ||
|
|
||
| namespace mlir { | ||
| class MLIRContext; | ||
| class ModuleOp; | ||
| } // namespace mlir | ||
|
|
||
| namespace cir { | ||
| class CIRGenConsumer; | ||
|
|
||
| class CIRGenAction : public clang::ASTFrontendAction { | ||
| public: | ||
| enum class OutputType { | ||
| EmitCIR, | ||
| }; | ||
|
|
||
| private: | ||
| friend class CIRGenConsumer; | ||
|
|
||
| mlir::OwningOpRef<mlir::ModuleOp> MLIRMod; | ||
|
|
||
| mlir::MLIRContext *MLIRCtx; | ||
|
|
||
| protected: | ||
| CIRGenAction(OutputType Action, mlir::MLIRContext *MLIRCtx = nullptr); | ||
|
|
||
| std::unique_ptr<clang::ASTConsumer> | ||
| CreateASTConsumer(clang::CompilerInstance &CI, | ||
| llvm::StringRef InFile) override; | ||
|
|
||
| public: | ||
| ~CIRGenAction() override; | ||
|
|
||
| OutputType Action; | ||
| }; | ||
|
|
||
| class EmitCIRAction : public CIRGenAction { | ||
| virtual void anchor(); | ||
|
|
||
| public: | ||
| EmitCIRAction(mlir::MLIRContext *MLIRCtx = nullptr); | ||
| }; | ||
|
|
||
| } // namespace cir | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| InheritParentConfig: true | ||
| Checks: > | ||
| -misc-const-correctness, | ||
| -llvm-header-guard, | ||
| bugprone-argument-comment, | ||
| bugprone-assert-side-effect, | ||
| bugprone-branch-clone, | ||
| bugprone-copy-constructor-init, | ||
| bugprone-dangling-handle, | ||
| bugprone-dynamic-static-initializers, | ||
| bugprone-macro-parentheses, | ||
| bugprone-macro-repeated-side-effects, | ||
| bugprone-misplaced-widening-cast, | ||
| bugprone-move-forwarding-reference, | ||
| bugprone-multiple-statement-macro, | ||
| bugprone-suspicious-semicolon, | ||
| bugprone-swapped-arguments, | ||
| bugprone-terminating-continue, | ||
| bugprone-unused-raii, | ||
| bugprone-unused-return-value, | ||
| misc-redundant-expression, | ||
| misc-static-assert, | ||
| misc-unused-using-decls, | ||
| modernize-use-bool-literals, | ||
| modernize-loop-convert, | ||
| modernize-make-unique, | ||
| modernize-raw-string-literal, | ||
| modernize-use-equals-default, | ||
| modernize-use-default-member-init, | ||
| modernize-use-emplace, | ||
| modernize-use-nullptr, | ||
| modernize-use-override, | ||
| modernize-use-using, | ||
| performance-for-range-copy, | ||
| performance-implicit-conversion-in-loop, | ||
| performance-inefficient-algorithm, | ||
| performance-inefficient-vector-operation, | ||
| performance-move-const-arg, | ||
| performance-no-automatic-move, | ||
| performance-trivially-destructible, | ||
| performance-unnecessary-copy-initialization, | ||
| performance-unnecessary-value-param, | ||
| readability-avoid-const-params-in-decls, | ||
| readability-const-return-type, | ||
| readability-container-size-empty, | ||
| readability-identifier-naming, | ||
| readability-inconsistent-declaration-parameter-name, | ||
| readability-misleading-indentation, | ||
| readability-redundant-control-flow, | ||
| readability-redundant-smartptr-get, | ||
| readability-simplify-boolean-expr, | ||
| readability-simplify-subscript-expr, | ||
| readability-use-anyofallof |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| InheritParentConfig: true | ||
| Checks: > | ||
| -misc-const-correctness, | ||
| -llvm-header-guard, | ||
| bugprone-argument-comment, | ||
| bugprone-assert-side-effect, | ||
| bugprone-branch-clone, | ||
| bugprone-copy-constructor-init, | ||
| bugprone-dangling-handle, | ||
| bugprone-dynamic-static-initializers, | ||
| bugprone-macro-parentheses, | ||
| bugprone-macro-repeated-side-effects, | ||
| bugprone-misplaced-widening-cast, | ||
| bugprone-move-forwarding-reference, | ||
| bugprone-multiple-statement-macro, | ||
| bugprone-suspicious-semicolon, | ||
| bugprone-swapped-arguments, | ||
| bugprone-terminating-continue, | ||
| bugprone-unused-raii, | ||
| bugprone-unused-return-value, | ||
| misc-redundant-expression, | ||
| misc-static-assert, | ||
| misc-unused-using-decls, | ||
| modernize-use-bool-literals, | ||
| modernize-loop-convert, | ||
| modernize-make-unique, | ||
| modernize-raw-string-literal, | ||
| modernize-use-equals-default, | ||
| modernize-use-default-member-init, | ||
| modernize-use-emplace, | ||
| modernize-use-nullptr, | ||
| modernize-use-override, | ||
| modernize-use-using, | ||
| performance-for-range-copy, | ||
| performance-implicit-conversion-in-loop, | ||
| performance-inefficient-algorithm, | ||
| performance-inefficient-vector-operation, | ||
| performance-move-const-arg, | ||
| performance-no-automatic-move, | ||
| performance-trivially-destructible, | ||
| performance-unnecessary-copy-initialization, | ||
| performance-unnecessary-value-param, | ||
| readability-avoid-const-params-in-decls, | ||
| readability-const-return-type, | ||
| readability-container-size-empty, | ||
| readability-identifier-naming, | ||
| readability-inconsistent-declaration-parameter-name, | ||
| readability-misleading-indentation, | ||
| readability-redundant-control-flow, | ||
| readability-redundant-smartptr-get, | ||
| readability-simplify-boolean-expr, | ||
| readability-simplify-subscript-expr, | ||
| readability-use-anyofallof | ||
| CheckOptions: | ||
| - key: readability-identifier-naming.MemberCase | ||
| value: camelBack | ||
| - key: readability-identifier-naming.ParameterCase | ||
| value: camelBack | ||
| - key: readability-identifier-naming.VariableCase | ||
| value: camelBack |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| //===- 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) {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| //===--- CIRGenModule.h - Per-Module state for CIR gen ----------*- 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 is the internal per-translation-unit state used for CIR translation. | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #ifndef LLVM_CLANG_LIB_CIR_CODEGEN_CIRGENMODULE_H | ||
| #define LLVM_CLANG_LIB_CIR_CODEGEN_CIRGENMODULE_H | ||
|
|
||
| #include "CIRGenTypeCache.h" | ||
|
|
||
| #include "mlir/IR/BuiltinOps.h" | ||
| #include "mlir/IR/MLIRContext.h" | ||
|
|
||
| namespace clang { | ||
| class ASTContext; | ||
| class CodeGenOptions; | ||
| class Decl; | ||
| class DiagnosticsEngine; | ||
| class LangOptions; | ||
| class TargetInfo; | ||
| } // namespace clang | ||
|
|
||
| using namespace clang; | ||
| namespace cir { | ||
|
|
||
| /// This class organizes the cross-function state that is used while generating | ||
| /// CIR code. | ||
| class CIRGenModule : public CIRGenTypeCache { | ||
| CIRGenModule(CIRGenModule &) = delete; | ||
| CIRGenModule &operator=(CIRGenModule &) = delete; | ||
|
|
||
| public: | ||
| CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, | ||
| const clang::CodeGenOptions &cgo, | ||
| clang::DiagnosticsEngine &diags); | ||
|
|
||
| ~CIRGenModule() = default; | ||
|
|
||
| private: | ||
| /// Hold Clang AST information. | ||
| clang::ASTContext &astCtx; | ||
|
|
||
| const clang::LangOptions &langOpts; | ||
|
|
||
| /// A "module" matches a c/cpp source file: containing a list of functions. | ||
| mlir::ModuleOp theModule; | ||
|
|
||
| const clang::TargetInfo ⌖ | ||
|
|
||
| public: | ||
| void buildTopLevelDecl(clang::Decl *decl); | ||
| }; | ||
| } // namespace cir | ||
|
|
||
| #endif // LLVM_CLANG_LIB_CIR_CODEGEN_CIRGENMODULE_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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() = default; | ||
| }; | ||
|
|
||
| } // namespace cir | ||
|
|
||
| #endif // LLVM_CLANG_LIB_CIR_CODEGEN_CIRGENTYPECACHE_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| //===--- CIRGenerator.cpp - Emit CIR from ASTs ----------------------------===// | ||
| // | ||
| // 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 builds an AST and converts it to CIR. | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "CIRGenModule.h" | ||
|
|
||
| #include "clang/AST/DeclGroup.h" | ||
| #include "clang/CIR/CIRGenerator.h" | ||
|
|
||
| using namespace cir; | ||
| using namespace clang; | ||
|
|
||
| void CIRGenerator::anchor() {} | ||
|
|
||
| CIRGenerator::CIRGenerator(clang::DiagnosticsEngine &diags, | ||
| llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> vfs, | ||
| const CodeGenOptions &cgo) | ||
| : diags(diags), fs(std::move(vfs)), codeGenOpts{cgo} {} | ||
| CIRGenerator::~CIRGenerator() = default; | ||
|
|
||
| void CIRGenerator::Initialize(ASTContext &astCtx) { | ||
| using namespace llvm; | ||
|
|
||
| this->astCtx = &astCtx; | ||
|
|
||
| cgm = std::make_unique<CIRGenModule>(*mlirCtx, astCtx, codeGenOpts, diags); | ||
| } | ||
|
|
||
| bool CIRGenerator::HandleTopLevelDecl(DeclGroupRef group) { | ||
|
|
||
| for (Decl *decl : group) | ||
| cgm->buildTopLevelDecl(decl); | ||
|
|
||
| return true; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| set( | ||
| LLVM_LINK_COMPONENTS | ||
| Core | ||
| Support | ||
| ) | ||
|
|
||
| get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS) | ||
|
|
||
| add_clang_library(clangCIR | ||
| CIRGenerator.cpp | ||
| CIRGenModule.cpp | ||
|
|
||
| DEPENDS | ||
| MLIRCIR | ||
| ${dialect_libs} | ||
|
|
||
| LINK_LIBS | ||
| clangAST | ||
| clangBasic | ||
| clangLex | ||
| ${dialect_libs} | ||
| MLIRCIR | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| //===--- CIRGenAction.cpp - LLVM Code generation Frontend Action ---------===// | ||
| // | ||
| // 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 | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "clang/CIR/FrontendAction/CIRGenAction.h" | ||
| #include "clang/CIR/CIRGenerator.h" | ||
| #include "clang/Frontend/CompilerInstance.h" | ||
|
|
||
| #include "mlir/IR/MLIRContext.h" | ||
| #include "mlir/IR/OwningOpRef.h" | ||
|
|
||
| using namespace cir; | ||
| using namespace clang; | ||
|
|
||
| namespace cir { | ||
|
|
||
| class CIRGenConsumer : public clang::ASTConsumer { | ||
|
|
||
| virtual void anchor(); | ||
|
|
||
| std::unique_ptr<raw_pwrite_stream> OutputStream; | ||
|
|
||
| IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS; | ||
| std::unique_ptr<CIRGenerator> Gen; | ||
|
|
||
| public: | ||
| CIRGenConsumer(CIRGenAction::OutputType Action, | ||
| DiagnosticsEngine &DiagnosticsEngine, | ||
| IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS, | ||
| const HeaderSearchOptions &HeaderSearchOptions, | ||
| const CodeGenOptions &CodeGenOptions, | ||
| const TargetOptions &TargetOptions, | ||
| const LangOptions &LangOptions, | ||
| const FrontendOptions &FEOptions, | ||
| std::unique_ptr<raw_pwrite_stream> OS) | ||
| : OutputStream(std::move(OS)), FS(VFS), | ||
| Gen(std::make_unique<CIRGenerator>(DiagnosticsEngine, std::move(VFS), | ||
| CodeGenOptions)) {} | ||
|
|
||
| bool HandleTopLevelDecl(DeclGroupRef D) override { | ||
| Gen->HandleTopLevelDecl(D); | ||
| return true; | ||
| } | ||
| }; | ||
| } // namespace cir | ||
|
|
||
| void CIRGenConsumer::anchor() {} | ||
|
|
||
| CIRGenAction::CIRGenAction(OutputType Act, mlir::MLIRContext *MLIRCtx) | ||
| : MLIRCtx(MLIRCtx ? MLIRCtx : new mlir::MLIRContext), Action(Act) {} | ||
|
|
||
| CIRGenAction::~CIRGenAction() { MLIRMod.release(); } | ||
|
|
||
| std::unique_ptr<ASTConsumer> | ||
| CIRGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { | ||
| std::unique_ptr<llvm::raw_pwrite_stream> Out = CI.takeOutputStream(); | ||
|
|
||
| auto Result = std::make_unique<cir::CIRGenConsumer>( | ||
| Action, CI.getDiagnostics(), &CI.getVirtualFileSystem(), | ||
| CI.getHeaderSearchOpts(), CI.getCodeGenOpts(), CI.getTargetOpts(), | ||
| CI.getLangOpts(), CI.getFrontendOpts(), std::move(Out)); | ||
|
|
||
| return Result; | ||
| } | ||
|
|
||
| void EmitCIRAction::anchor() {} | ||
| EmitCIRAction::EmitCIRAction(mlir::MLIRContext *MLIRCtx) | ||
| : CIRGenAction(OutputType::EmitCIR, MLIRCtx) {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| set(LLVM_LINK_COMPONENTS | ||
| Core | ||
| Support | ||
| ) | ||
|
|
||
| get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS) | ||
|
|
||
| add_clang_library(clangCIRFrontendAction | ||
| CIRGenAction.cpp | ||
|
|
||
| LINK_LIBS | ||
| clangAST | ||
| clangFrontend | ||
| clangCIR | ||
| MLIRCIR | ||
| MLIRIR | ||
| ) |