[llvm] [llvm] Remove CV-qualified base class in PassManagerInternal.h (PR #124193)
Henry Jiang via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 13:11:07 PST 2025
https://github.com/mustartt created https://github.com/llvm/llvm-project/pull/124193
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`
>From ba384c137a0b3712304a2114c372c8112e4438f9 Mon Sep 17 00:00:00 2001
From: Henry Jiang <henry.jiang1 at ibm.com>
Date: Thu, 23 Jan 2025 14:57:17 -0500
Subject: [PATCH] remove cv qualified base class
---
llvm/include/llvm/IR/PassManagerInternal.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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>);
More information about the llvm-commits
mailing list