[cfe-dev] Two style questions

Chris Lattner clattner at apple.com
Tue Nov 13 10:25:45 PST 2007


On Nov 11, 2007, at 6:49 AM, Cédric Venet wrote:

>>> In particular, I don't see why BuilderTy in ModuleBuilder.h is
>>> declared as
>>> an opaque type since it represente a CodeGenModule and could simply
>>> use a
>>> forward declared class no?
>>
>> You're right, this is a clear "bug", please send in a patch!
>
> Attached: patch1.patch

Applied, thanks!
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of- 
Mon-20071112/002838.html

>> I'm not familiar with boost scoped_ptr, and won't have time to dig
>> into it for a couple of days.  Assuming it is simple and useful (i.e.
>> it really does simplify the C++ code we end up writing and
>> maintaining), I don't have a problem with adopting it.
>
> Scoped_ptr must be the simplest smart pointer existing, but useful:

Sounds great.

> Attached the scoped_ptr extracted from boost (just modified the  
> include
> style from <> to ""), there is some accessory (but useful) features  
> which
> could be deleted as the complete_type delete checker.

Please cut this down significantly more.  We don't currently support  
old versions of metrowerks or sunpro, so those and the boost  
workaround stuff can all go away.  Also, instead of  BOOST_ASSERT,  
please just use <cassert> and assert.  Please make it into a single  
header that we can check into include/llvm/ADT.  Thanks!

-Chris



More information about the cfe-dev mailing list