LGTM<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 14, 2012 at 1:27 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ping.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Sep 4, 2012 at 5:26 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
> Ping.<br>
><br>
> On Wed, Aug 29, 2012 at 8:56 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
>> Updated based on feedback from IRC. Updated some comments, made Clang<br>
>> use the standard feature rather than the __attribute__, removed some<br>
>> unused template definitions.<br>
>><br>
>> On Tue, Aug 28, 2012 at 3:56 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
>>> Here's an attempt to fix the incorrect/non-portable code in AlignAs.h<br>
>>> and its unit test.<br>
>>><br>
>>> We were previously trying to align typedefs, which isn't valid in<br>
>>> C++11. Even attempting to use alignas correctly won't work on any<br>
>>> compiler other than Clang anyway, even those (such as GCC 4.7)<br>
>>> reporting C++11 compliance through the __cplusplus macro value.<br>
>>><br>
>>> So instead:<br>
>>> for __GNUC__, use __attribute__((aligned(x))) of a char<br>
>>> for __cplusplus == 201103L || __has_feature(cxx_alignas), use alignas<br>
>>> on a char (this code path isn't actually tested at the moment since<br>
>>> clang reports __GNUC__ so it hits the first case)<br>
>>> for _MSC_VER, use __declspec(align(x)) on a char<br>
>>><br>
>>> This doesn't try to align a typedef as we were doing before, so I cut<br>
>>> a few test cases & extra types out of the test file - this doesn't<br>
>>> change the implementation much because we were stuffing a variable of<br>
>>> the typedef'd type in an anonymous struct anyway - so now we just use<br>
>>> the template with the aligned member directly.<br>
>>><br>
>>> Yes/no/maybe? (I haven't actually looked at the code to see if this is<br>
>>> producing correct code - just updated the test cases fairly<br>
>>> mechanically & checked that they pass)<br>
>>><br>
>>> - David<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>