[llvm-commits] updated patch for PR889

Chris Lattner clattner at apple.com
Thu Nov 29 08:56:32 PST 2007

On Nov 29, 2007, at 1:57 AM, pawel kunio wrote:

> As to the tabs and 80 char limit, already applied.


> Regarding the
> patch, I'd say I'd rather stick
> to the assert(0 && "Unknown 'subtype' instruction in Value  
> destructor");
> The reason is two-fold, 1. Some of the Value inherited class could
> have escaped my searches
> and 2. We will be able to enforce more strictly the destroyThis method
> pattern in newly added
> Value inherited classes.
> What do You think?

I'm ok with either one.  Note that they will both enforce the  
property for new classes.  If you have:

   if (..)
   else if (...)
     assert(0 && "bad");

This will assert if none of the if's above match.  Likewise, if you  

   if (..)

The cast in the 'else' case will abort if 'this' doesn't match sometype.


More information about the llvm-commits mailing list