[Mlir-commits] [mlir] f5cc961 - [mlir] Fix a warning
Kazu Hirata
llvmlistbot at llvm.org
Tue Feb 13 11:41:38 PST 2024
Author: Kazu Hirata
Date: 2024-02-13T11:41:32-08:00
New Revision: f5cc961240b327cac83041f04ea339859e7d5c9c
URL: https://github.com/llvm/llvm-project/commit/f5cc961240b327cac83041f04ea339859e7d5c9c
DIFF: https://github.com/llvm/llvm-project/commit/f5cc961240b327cac83041f04ea339859e7d5c9c.diff
LOG: [mlir] Fix a warning
This patch fixes:
mlir/lib/Target/LLVMIR/AttrKindDetail.h:65:1: error: unused function
'getAttrNameToKindMapping' [-Werror,-Wunused-function]
Added:
Modified:
mlir/lib/Target/LLVMIR/AttrKindDetail.h
Removed:
################################################################################
diff --git a/mlir/lib/Target/LLVMIR/AttrKindDetail.h b/mlir/lib/Target/LLVMIR/AttrKindDetail.h
index b01858ea81438..ddc6d46b90bb2 100644
--- a/mlir/lib/Target/LLVMIR/AttrKindDetail.h
+++ b/mlir/lib/Target/LLVMIR/AttrKindDetail.h
@@ -61,7 +61,8 @@ getAttrKindToNameMapping() {
/// Returns a dense map from LLVM attribute name to their kind in LLVM IR
/// dialect.
-static llvm::DenseMap<llvm::StringRef, llvm::Attribute::AttrKind>
+[[maybe_unused]] static llvm::DenseMap<llvm::StringRef,
+ llvm::Attribute::AttrKind>
getAttrNameToKindMapping() {
static auto attrNameToKindMapping = []() {
llvm::DenseMap<llvm::StringRef, llvm::Attribute::AttrKind> nameKindMap;
More information about the Mlir-commits
mailing list