[Mlir-commits] [mlir] [mlir][NFC] Use DefaultUnreachable in TypeSwitch (PR #230333)
Benjamin Wu
llvmlistbot at llvm.org
Thu Oct 8 17:47:58 PDT 2026
https://github.com/benjaminwuTT updated https://github.com/llvm/llvm-project/pull/230333
>From 66becf748d1798e8ed0c7cd8cb3e4ceb25e941e9 Mon Sep 17 00:00:00 2001
From: Benjamin Wu <benjaminwu at tenstorrent.com>
Date: Thu, 8 Oct 2026 17:39:24 -0700
Subject: [PATCH] [mlir][NFC] Use DefaultUnreachable in TypeSwitch
---
mlir/lib/Target/LLVMIR/DebugTranslation.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mlir/lib/Target/LLVMIR/DebugTranslation.cpp b/mlir/lib/Target/LLVMIR/DebugTranslation.cpp
index 6934aab253070e..6c091389f22e80 100644
--- a/mlir/lib/Target/LLVMIR/DebugTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/DebugTranslation.cpp
@@ -276,9 +276,8 @@ llvm::DIDerivedType *DebugTranslation::translateImpl(DIDerivedTypeAttr attr) {
return llvm::ConstantAsMetadata::get(
llvm::ConstantInt::get(llvmCtx, intAttr.getValue()));
})
- .Default([](Attribute) -> llvm::Metadata * {
- llvm_unreachable("verifier guarantees DINodeAttr or IntegerAttr");
- });
+ .DefaultUnreachable(
+ "verifier guarantees DINodeAttr or IntegerAttr");
}
return llvm::DIDerivedType::get(
More information about the Mlir-commits
mailing list