[llvm] 4405f72 - [llvm][NFC] Remove CV-qualified base class in PassManagerInternal.h (#124193)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 17:36:16 PST 2025
Author: Henry Jiang
Date: 2025-01-23T20:36:13-05:00
New Revision: 4405f728819350e35e34080874e1cf505bcb4ec6
URL: https://github.com/llvm/llvm-project/commit/4405f728819350e35e34080874e1cf505bcb4ec6
DIFF: https://github.com/llvm/llvm-project/commit/4405f728819350e35e34080874e1cf505bcb4ec6.diff
LOG: [llvm][NFC] Remove CV-qualified base class in PassManagerInternal.h (#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`
https://lab.llvm.org/buildbot/#/builders/168/builds/7756
---------
Co-authored-by: Henry Jiang <henry.jiang1 at ibm.com>
Added:
Modified:
llvm/include/llvm/IR/PassManagerInternal.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/PassManagerInternal.h b/llvm/include/llvm/IR/PassManagerInternal.h
index 4ada6ee5dd6831..62bede206da50d 100644
--- a/llvm/include/llvm/IR/PassManagerInternal.h
+++ b/llvm/include/llvm/IR/PassManagerInternal.h
@@ -22,6 +22,7 @@
#include "llvm/IR/Analysis.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
+#include <type_traits>
#include <utility>
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