moving to llvmdev. It always amused me that we have @a = weak global ... but @b = alias weak ... I decided to dig why that is. The best I could find was http://llvm.org/bugs/show_bug.cgi?id=1017#c15 Looking at some really old cold then suggests that the reason was that the old bison based parser hard a reduction for alias linkages and another one for global variable linkages. Putting the alias first avoided the reduce/reduce conflict. The days of the old .ll parser are long gone, but is it too late to change? In case it is not, the attached patches implement just that :-) Cheers, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch Type: text/x-patch Size: 48191 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140605/489319a7/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: clang.patch Type: text/x-patch Size: 3998 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140605/489319a7/attachment-0001.bin>
rebased patches attached. On 5 June 2014 09:51, Rafael Espíndola <rafael.espindola at gmail.com> wrote:> moving to llvmdev. > > It always amused me that we have > > @a = weak global ... > but > @b = alias weak ... > > I decided to dig why that is. The best I could find was > > http://llvm.org/bugs/show_bug.cgi?id=1017#c15 > > Looking at some really old cold then suggests that the reason was that > the old bison based parser hard a reduction for alias linkages and > another one for global variable linkages. Putting the alias first > avoided the reduce/reduce conflict. > > The days of the old .ll parser are long gone, but is it too late to > change? In case it is not, the attached patches implement just that > :-) > > Cheers, > Rafael-------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch Type: text/x-patch Size: 48753 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140605/5a0fb42a/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: clang.patch Type: text/x-patch Size: 3998 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140605/5a0fb42a/attachment-0001.bin>
> Looking at some really old cold then suggests that the reason was that > the old bison based parser hard a reduction for alias linkages and > another one for global variable linkages. Putting the alias first > avoided the reduce/reduce conflict.Exactly> The days of the old .ll parser are long gone, but is it too late to > change? In case it is not, the attached patches implement just that > :-)I'm afraid you need to provide syntax autoupgrade until 4.0 -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
>> The days of the old .ll parser are long gone, but is it too late to >> change? In case it is not, the attached patches implement just that >> :-) > I'm afraid you need to provide syntax autoupgrade until 4.0Why, we moved to doing autoupgrade via bitcode quiet some time ago. There were quiet a few format changes to the .ll in the process. Cheers, Rafael