[llvm] [IR] Remove an unnecessary cast (NFC) (PR #146464)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 21:12:34 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146464
The destructor does not return anything.
>From f652d6ec5e0126b6e60a9457aa03c37ad5f1027a Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Mon, 30 Jun 2025 10:17:33 -0700
Subject: [PATCH] [IR] Remove an unnecessary cast (NFC)
The destructor does not return anything.
---
llvm/lib/IR/Metadata.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 86408d9643c75..f0448b06e7e82 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -699,7 +699,7 @@ MDNode::Header::~Header() {
}
MDOperand *O = reinterpret_cast<MDOperand *>(this);
for (MDOperand *E = O - SmallSize; O != E; --O)
- (void)(O - 1)->~MDOperand();
+ (O - 1)->~MDOperand();
}
void *MDNode::Header::getSmallPtr() {
More information about the llvm-commits
mailing list