Summary:
* Follows the convention of the tablegen-generated dialects.
* Ensures that vague linkage rules place the definitions in the dialect's object files.
* Allows code that uses RTTI to include MLIR headers (compiled without RTTI) without
type_info link errors.
Reviewers: rriddle
Reviewed By: rriddle
Subscribers: mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78039
public:
SDBMDialect(MLIRContext *context) : Dialect(getDialectNamespace(), context) {}
+ /// Since there are no other virtual methods in this derived class, override
+ /// the destructor so that key methods get defined in the corresponding
+ /// module.
+ ~SDBMDialect() override;
+
static StringRef getDialectNamespace() { return "sdbm"; }
/// Get the uniquer for SDBM expressions. This should not be used directly.
add_mlir_dialect_library(MLIRSDBM
SDBM.cpp
+ SDBMDialect.cpp
SDBMExpr.cpp
ADDITIONAL_HEADER_DIRS
--- /dev/null
+//===- SDBMDialect.cpp - MLIR SDBM Dialect --------------------------------===//
+//
+// 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/Dialect/SDBM/SDBMDialect.h"
+
+using namespace mlir;
+
+SDBMDialect::~SDBMDialect() = default;