On Feb 7, 2012, at 4:04 PM, Kostya Serebryany wrote:> On Tue, Feb 7, 2012 at 3:46 PM, John McCall <rjmccall at apple.com> wrote: > On Feb 7, 2012, at 2:07 PM, Kostya Serebryany wrote: > > Slightly formatted/commented patch. > > WDYT? > > This seems to work fine, except that reading a field from a const > AttrConst is not a constant expression in C++03, so the "set" > declarations (ParameterOnly, FunctionOnly, VarArgsIncompatible, > and MutuallyIncompatible) still require a global constructor. > OMG, yes, indeed. > You > can split the values into separate 'const uint64_t' declarations and > use those; it makes the header even uglier, but it works. > > like this (see the new patch)?Yes, that's great, thanks! John. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120207/b5f98a3f/attachment.html>
On Tue, Feb 7, 2012 at 4:55 PM, John McCall <rjmccall at apple.com> wrote:> On Feb 7, 2012, at 4:04 PM, Kostya Serebryany wrote: > > On Tue, Feb 7, 2012 at 3:46 PM, John McCall <rjmccall at apple.com> wrote: > >> On Feb 7, 2012, at 2:07 PM, Kostya Serebryany wrote: >> > Slightly formatted/commented patch. >> > WDYT? >> >> This seems to work fine, except that reading a field from a const >> AttrConst is not a constant expression in C++03, so the "set" >> declarations (ParameterOnly, FunctionOnly, VarArgsIncompatible, >> and MutuallyIncompatible) still require a global constructor. > > OMG, yes, indeed. > >> You >> can split the values into separate 'const uint64_t' declarations and >> use those; it makes the header even uglier, but it works. >> > > like this (see the new patch)? > > > Yes, that's great, thanks! >Shall I commit? --kcc> > John. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120207/beec3b75/attachment.html>
On Feb 7, 2012, at 4:56 PM, Kostya Serebryany wrote:> On Tue, Feb 7, 2012 at 4:55 PM, John McCall <rjmccall at apple.com> wrote: > On Feb 7, 2012, at 4:04 PM, Kostya Serebryany wrote: >> On Tue, Feb 7, 2012 at 3:46 PM, John McCall <rjmccall at apple.com> wrote: >> On Feb 7, 2012, at 2:07 PM, Kostya Serebryany wrote: >> > Slightly formatted/commented patch. >> > WDYT? >> >> This seems to work fine, except that reading a field from a const >> AttrConst is not a constant expression in C++03, so the "set" >> declarations (ParameterOnly, FunctionOnly, VarArgsIncompatible, >> and MutuallyIncompatible) still require a global constructor. >> OMG, yes, indeed. >> You >> can split the values into separate 'const uint64_t' declarations and >> use those; it makes the header even uglier, but it works. >> >> like this (see the new patch)? > > Yes, that's great, thanks! > > Shall I commit?Go ahead; we'll adjust as necessary if it doesn't fix our internal problem. John. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120207/5eababfe/attachment.html>
On Feb 7, 2012, at 4:56 PM, Kostya Serebryany wrote:> > > On Tue, Feb 7, 2012 at 4:55 PM, John McCall <rjmccall at apple.com> wrote: > On Feb 7, 2012, at 4:04 PM, Kostya Serebryany wrote: >> On Tue, Feb 7, 2012 at 3:46 PM, John McCall <rjmccall at apple.com> wrote: >> On Feb 7, 2012, at 2:07 PM, Kostya Serebryany wrote: >> > Slightly formatted/commented patch. >> > WDYT? >> >> This seems to work fine, except that reading a field from a const >> AttrConst is not a constant expression in C++03, so the "set" >> declarations (ParameterOnly, FunctionOnly, VarArgsIncompatible, >> and MutuallyIncompatible) still require a global constructor. >> OMG, yes, indeed. >> You >> can split the values into separate 'const uint64_t' declarations and >> use those; it makes the header even uglier, but it works. >> >> like this (see the new patch)? > > Yes, that's great, thanks! > > Shall I commit?Thanks Kostya! -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120207/24147b71/attachment.html>