zhaomo added inline comments.
================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:1767
 
+  bool InBounds = shouldInterleaveVTables(VTableClass) ? false : true;
   return llvm::ConstantExpr::getGetElementPtr(VTable->getValueType(), VTable,
----------------
pcc wrote:
> Remind me why this needs to be here? (And the explanation needs to be in a 
> comment.)
The calculation of address point is essentially base_vtable_addr + offset, 
where offset is from the indices of gep.
In the interleaving pass, we replace base_vtable_addr with 
(addr_point_in_interleaved_layout - offset).

The LLVM language reference says that the base address of a inbounds gep must 
be an in bound address of the object. The new base address 
addr_point_in_interleaved_layout - offset, however, may not be an in bound 
address.


https://reviews.llvm.org/D51905



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

Reply via email to