https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61555

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Are you sure this is not a LLVM source issue? 
> 
> llvm::cl::parser<llvm::PassInfo const*>::getOption(unsigned int) const
>  is called by llvm::cl::C<llvm::D>::getExtraOptionNames(int&).
> 
> llvm::cl::C<llvm::D>::getExtraOptionNames(int&) is part of vtable for
> llvm::cl::C<llvm::D>.
> 
> 
> I don't see anything wrong here really as the type of Parser can found at
> compile time and it is D inherits from cl::parser<const PassInfo *>.
> So getExtraOptionNames calls Parser.getExtraOptionNames which in turns calls
> this->getOption (0) which is a virtual function call.  Since we know the
> type of *this here, we call directly llvm::cl::parser<llvm::PassInfo
> const*>::getOption(unsigned int) const.
> 
> So the devirtuatization seems correct and it is just a LLVM source problem.

Thanks. I just wasn't 100% sure. LLVM bug:
http://llvm.org/bugs/show_bug.cgi?id=20067

Reply via email to