[Mlir-commits] [mlir] [mlir] Make overloads of SymbolTable::replaceAllSymbolUses consistent. (PR #68320)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Fri Oct 6 02:18:56 PDT 2023
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/68320/mlir at github.com>
================
@@ -0,0 +1,107 @@
+//===- SymbolTableTest.cpp - SymbolTable unit tests -----------------------===//
+//
+// 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 "mlir/IR/SymbolTable.h"
+#include "../../test/lib/Dialect/Test/TestDialect.h"
+#include "mlir/IR/Verifier.h"
+#include "mlir/Interfaces/CallInterfaces.h"
+#include "mlir/Interfaces/FunctionInterfaces.h"
+#include "mlir/Parser/Parser.h"
+
+#include "gtest/gtest.h"
+
+using namespace mlir;
+
+namespace {
+TEST(SymbolTableTest, ReplaceAllSymbolUses) {
+ MLIRContext context;
+ context.getOrLoadDialect<test::TestDialect>();
----------------
ftynse wrote:
For parsing, you don't need to load the dialect, it is sufficient to register it. For that, you can locally declare `test::registerTestDialect(DialectRegistry &)` and call it + link the test dialect library. This will remove the awkward relative include.
https://github.com/llvm/llvm-project/pull/68320
More information about the Mlir-commits
mailing list