[LLVMdev] Static ctors in llvm::Attribute

Kostya Serebryany kcc at google.com
Tue Feb 7 14:07:59 PST 2012

Slightly formatted/commented patch.


On Tue, Feb 7, 2012 at 1:29 PM, Kostya Serebryany <kcc at google.com> wrote:

> On Tue, Feb 7, 2012 at 12:53 PM, Kostya Serebryany <kcc at google.com> wrote:
>> I see the problem.
>> Let me try to come up with a solution that does not involve constructors
>> but also does not sacrifice type safety.
> I have a patch that uses a proxy POD type. 'make && make check' passes.
> It's a bit ugly in the header file (include/llvm/Attributes.h), but does
> not require any changes in the rest of the code,
> is typesef and Attributes retain the default CTOR (i.e. no uninitialized
> Attributes objects).
> If the approach is ok, I'll this patch (formatted and commented) for
> further review.
> --kcc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120207/9914a6cf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attr.patch
Type: text/x-patch
Size: 8440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120207/9914a6cf/attachment.bin>

More information about the llvm-dev mailing list