diff --git a/llvm/include/llvm/IR/PassManagerInternal.h b/llvm/include/llvm/IR/PassManagerInternal.h index 4ada6ee5dd683..62bede206da50 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 +#include #include namespace llvm { @@ -167,7 +168,7 @@ template class ResultHasInvalidateMethod { // ambiguous if there were an invalidate member in the result type. template static DisabledType NonceFunction(T U::*); struct CheckerBase { int invalidate; }; - template struct Checker : CheckerBase, T {}; + template struct Checker : CheckerBase, std::remove_cv_t {}; template static decltype(NonceFunction(&Checker::invalidate)) check(rank<1>);