[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

David Olsen via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 11:24:02 PDT 2024


================
@@ -0,0 +1,38 @@
+//===- CIRAttrs.cpp - MLIR CIR Attributes ---------------------------------===//
+//
+// 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 defines the attributes in the CIR dialect.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/CIR/Dialect/IR/CIRDialect.h"
+
+using namespace mlir;
+using namespace mlir::cir;
----------------
dkolsen-pgi wrote:

Those `using namespace` directives are in the Clang incubator project.  I would prefer to minimize the gratuitous differences between LLVM upstream and ClangIR incubator.

There is discussion about getting rid of the `::mlir::cir` namespace and moving everything therein to the `::cir` namespace.  If that happens, I will make the corresponding change upstream and will likely get rid of the `using namespace` directives then.


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


More information about the cfe-commits mailing list