[llvm-commits] [llvm] r166611 - /llvm/trunk/include/llvm/Operator.h

Craig Topper craig.topper at gmail.com
Wed Oct 24 15:53:36 PDT 2012


Are those the errors from gcc? I noticed clang bootstrap was failing, but I
don't think it flagged the private ~Operator() which made it really non
obvious why it was failing.

On Wed, Oct 24, 2012 at 12:17 PM, Kaelyn Uhrain <rikka at google.com> wrote:

> Author: rikka
> Date: Wed Oct 24 14:17:42 2012
> New Revision: 166611
>
> URL: http://llvm.org/viewvc/llvm-project?rev=166611&view=rev
> Log:
> Make ~Operator() protected so subclasses can inherit it and not have
> a bunch of errors for all the Operator subclasses such as:
>
> include/llvm/Operator.h:76:7: error: deleted function 'virtual
> llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()'
> include/llvm/Operator.h:43:3: error: overriding non-deleted function
> 'virtual llvm::Operator::~Operator()'
> include/llvm/Operator.h:76:7: error: 'virtual
> llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()' is
> implicitly deleted because the default definition would be ill-formed:
> include/llvm/Operator.h:43:3: error: 'virtual llvm::Operator::~Operator()'
> is private
> include/llvm/Operator.h:76:7: error: within this context
>
> Modified:
>     llvm/trunk/include/llvm/Operator.h
>
> Modified: llvm/trunk/include/llvm/Operator.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Operator.h?rev=166611&r1=166610&r2=166611&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Operator.h (original)
> +++ llvm/trunk/include/llvm/Operator.h Wed Oct 24 14:17:42 2012
> @@ -37,6 +37,7 @@
>    void *operator new(size_t s) LLVM_DELETED_FUNCTION;
>    Operator() LLVM_DELETED_FUNCTION;
>
> +protected:
>    // NOTE: Cannot use LLVM_DELETED_FUNCTION because it's not legal to
> delete
>    // an overridden method that's not deleted in the base class. Cannot
> leave
>    // this unimplemented because that leads to an ODR-violation.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121024/162b4aed/attachment.html>


More information about the llvm-commits mailing list