vleschuk added inline comments.

================
Comment at: lib/CodeGen/CGDebugInfo.cpp:608
@@ -608,2 +607,3 @@
 
   uint64_t Size = CGM.getContext().getTypeSize(Ty);
+  uint64_t Align = 0;
----------------
rnk wrote:
> IMO this is what we should be doing everywhere, rather than manually checking 
> AlignedAttr:
>   TypeInfo TI = CGM.getContext().getTypeInfo(Ty);
>   uint64_t Size = TI.Width;
>   uint64_t Align = TI.AlignIsRequired ? TI.Align : 0;
> 
> This saves a hash lookup, and handles some corner cases. AlignIsRequired is 
> already supposed to capture whether the alignment was changed.
Will check if this works in all cases. I think it's worth putting this snippet 
into helper function within anon namespace.


https://reviews.llvm.org/D24426



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to