[llvm-commits] CVS: llvm/include/llvm/Support/ManagedStatic.h

Chris Lattner clattner at apple.com
Wed Sep 27 21:29:17 PDT 2006


>> +   void LazyInit() const {
>> +     RegisterManagedStatic(new C(), object_deleter<C>);
>
> This requires a default constructor for class "C". How would that work
> for things like:
>
> static PrimType TheVoidTy  ("void"  , Type::VoidTyID);

It doesn't.  That specific case can be handled by making a type  
derived from PrimType whose default ctor passes down the values.

The uglier case to handle is stuff like the initializer for  
"ConstantBool::True".

-Chris



More information about the llvm-commits mailing list