[llvm] [llvm] Remove CV-qualified base class in PassManagerInternal.h (PR #124193)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 13:11:41 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Henry Jiang (mustartt)
<details>
<summary>Changes</summary>
This resolves the `-Wignored-qualifiers` warning introduced by the new warnign in https://github.com/llvm/llvm-project/pull/121419. First caught in buildbot `ppc64le-lld-multistage-test`
https://lab.llvm.org/buildbot/#/builders/168/builds/7756
---
Full diff: https://github.com/llvm/llvm-project/pull/124193.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/PassManagerInternal.h (+2-1)
``````````diff
diff --git a/llvm/include/llvm/IR/PassManagerInternal.h b/llvm/include/llvm/IR/PassManagerInternal.h
index 4ada6ee5dd6831..4b6fad9b417889 100644
--- a/llvm/include/llvm/IR/PassManagerInternal.h
+++ b/llvm/include/llvm/IR/PassManagerInternal.h
@@ -23,6 +23,7 @@
#include "llvm/Support/raw_ostream.h"
#include <memory>
#include <utility>
+#include <type_traits>
namespace llvm {
@@ -167,7 +168,7 @@ template <typename IRUnitT, typename ResultT> class ResultHasInvalidateMethod {
// ambiguous if there were an invalidate member in the result type.
template <typename T, typename U> static DisabledType NonceFunction(T U::*);
struct CheckerBase { int invalidate; };
- template <typename T> struct Checker : CheckerBase, T {};
+ template <typename T> struct Checker : CheckerBase, std::remove_cv_t<T> {};
template <typename T>
static decltype(NonceFunction(&Checker<T>::invalidate)) check(rank<1>);
``````````
</details>
https://github.com/llvm/llvm-project/pull/124193
More information about the llvm-commits
mailing list