[PATCH] D41452: [CodeGen] Fix access sizes in new-format TBAA tags

Ivan Kosarev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 21 00:15:16 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL321250: [CodeGen] Fix access sizes in new-format TBAA tags (authored by kosarev, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41452?vs=127724&id=127834#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41452

Files:
  cfe/trunk/lib/CodeGen/CGExpr.cpp


Index: cfe/trunk/lib/CodeGen/CGExpr.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp
@@ -3801,8 +3801,10 @@
       FieldTBAAInfo.Offset +=
           Layout.getFieldOffset(field->getFieldIndex()) / CharWidth;
 
-    // Update the final access type.
+    // Update the final access type and size.
     FieldTBAAInfo.AccessType = CGM.getTBAATypeInfo(FieldType);
+    FieldTBAAInfo.Size =
+        getContext().getTypeSizeInChars(FieldType).getQuantity();
   }
 
   Address addr = base.getAddress();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41452.127834.patch
Type: text/x-patch
Size: 594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171221/2d0859c5/attachment.bin>


More information about the cfe-commits mailing list