[Mlir-commits] [mlir] [mlir][nfc] Fix gcc compiler error on destructor in PassRegistry.cpp (PR #187900)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Mar 21 20:34:01 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Chris Cotter (ccotter)

<details>
<summary>Changes</summary>

Remove template arguments from out-of-line destructor definition, as C++20 does not allow template-ids on destructors.

---
Full diff: https://github.com/llvm/llvm-project/pull/187900.diff


1 Files Affected:

- (modified) mlir/lib/Pass/PassRegistry.cpp (+1-1) 


``````````diff
diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp
index d14d49aac9898..d1c4aaee20739 100644
--- a/mlir/lib/Pass/PassRegistry.cpp
+++ b/mlir/lib/Pass/PassRegistry.cpp
@@ -436,7 +436,7 @@ llvm::cl::OptionValue<OpPassManager>::operator=(
   return *this;
 }
 
-llvm::cl::OptionValue<OpPassManager>::~OptionValue<OpPassManager>() = default;
+llvm::cl::OptionValue<OpPassManager>::~OptionValue() = default;
 
 void llvm::cl::OptionValue<OpPassManager>::setValue(
     const OpPassManager &newValue) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/187900


More information about the Mlir-commits mailing list