[llvm] 4145ad2 - [NewPM] Add deduction guide to `MFPropsModifier` to suppress warning (#96384)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 22 02:59:33 PDT 2024


Author: paperchalice
Date: 2024-06-22T17:59:30+08:00
New Revision: 4145ad2bac4bb99d5034d60c74bb2789f6c6e802

URL: https://github.com/llvm/llvm-project/commit/4145ad2bac4bb99d5034d60c74bb2789f6c6e802
DIFF: https://github.com/llvm/llvm-project/commit/4145ad2bac4bb99d5034d60c74bb2789f6c6e802.diff

LOG: [NewPM] Add deduction guide to `MFPropsModifier` to suppress warning (#96384)

Buildbot `clang-ppc64le-rhel` failed with:
```sh
error: 'MFPropsModifier' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
note: add a deduction guide to suppress this warning
```
after #94854. This PR adds deduction guide explicitly to suppress
warning.

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/MachinePassManager.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MachinePassManager.h b/llvm/include/llvm/CodeGen/MachinePassManager.h
index 8c4a70493383a..253fabdac0019 100644
--- a/llvm/include/llvm/CodeGen/MachinePassManager.h
+++ b/llvm/include/llvm/CodeGen/MachinePassManager.h
@@ -99,6 +99,10 @@ template <typename PassT> class MFPropsModifier {
       is_detected<has_get_cleared_properties_t, T>::value;
 };
 
+// Additional deduction guide to suppress warning.
+template <typename PassT>
+MFPropsModifier(PassT &P, MachineFunction &MF) -> MFPropsModifier<PassT>;
+
 using MachineFunctionAnalysisManagerModuleProxy =
     InnerAnalysisManagerProxy<MachineFunctionAnalysisManager, Module>;
 


        


More information about the llvm-commits mailing list