[llvm] r289317 - [PM] Support invalidation of inner analysis managers from a pass over the outer IR unit.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 23:27:09 PST 2016


(Sorry this took me so long to get back to...)

On Tue, Dec 13, 2016 at 1:11 PM Reid Kleckner <rnk at google.com> wrote:

> This introduced an MSVC warning which I think is pretty reasonable:
> [402/3123] Building CXX object
> lib\Analysis\CMakeFiles\LLVMAnalysis.dir\CGSCCPassManager.cpp.obj
> C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\include\llvm/IR/PassManager.h(803):
> warning C4661: 'bool
> llvm::InnerAnalysisManagerProxy<llvm::FunctionAnalysisManager,llvm::LazyCallGraph::SCC,llvm::LazyCallGraph
> &>::Result::invalidate(IRUnitT &,const llvm::PreservedAnalyses
> &,llvm::AnalysisManager<IRUnitT,llvm::LazyCallGraph &>::Invalidator &)': no
> suitable definition provided for explicit template instantiation request
>         with
>         [
>             IRUnitT=llvm::LazyCallGraph::SCC
>         ]
> C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\include\llvm/IR/PassManager.h(798):
> note: see declaration of
> 'llvm::InnerAnalysisManagerProxy<llvm::FunctionAnalysisManager,llvm::LazyCallGraph::SCC,llvm::LazyCallGraph
> &>::Result::invalidate'
> C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\include\llvm/Analysis/CGSCCPassManager.h(486):
> warning C4661: 'bool
> llvm::InnerAnalysisManagerProxy<llvm::FunctionAnalysisManager,llvm::LazyCallGraph::SCC,llvm::LazyCallGraph
> &>::Result::invalidate(IRUnitT &,const llvm::PreservedAnalyses
> &,llvm::AnalysisManager<IRUnitT,llvm::LazyCallGraph &>::Invalidator &)': no
> suitable definition provided for explicit template instantiation request
>         with
>         [
>             IRUnitT=llvm::LazyCallGraph::SCC
>         ]
> C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\include\llvm/IR/PassManager.h(798):
> note: see declaration of
> 'llvm::InnerAnalysisManagerProxy<llvm::FunctionAnalysisManager,llvm::LazyCallGraph::SCC,llvm::LazyCallGraph
> &>::Result::invalidate'
> [403/3123] Building CXX object
> lib\Transforms\Vectorize\CMakeFiles\LLVMVectorize.dir\BBVectorize.cpp.obj
>
> I think it's complaining that 'invalidate' is a declaration, and you never
> provide a definition for it, only a specialization of it later.
>

I mean, yes it is complaining about that, but not because there is a
specialization anywhere, but because there isn't.

This was completely bogus code that got left in when other code changed. I
have no idea why Clang accepts this at all. I think it should at *least* be
a warning and possibly an error to explicitly instantiate a class template
when some members aren't yet defined. I've deleted all the dead code in
r290327. Want to file a Clang bug to diagnose this nonsense?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161222/eed423f8/attachment.html>


More information about the llvm-commits mailing list