[PATCH] D51416: [RTTI] Align rtti types to prevent over-alignment
    Eli Friedman via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Sep  4 11:28:29 PDT 2018
    
    
  
efriedma added a comment.
getClassPointerAlignment is not really relevant here; that's the alignment of a pointer to an object with the type of the class.
For the LLVM IR structs which don't have a corresponding clang type, you can probably just use DataLayout::getABITypeAlignment().  I think that's just the alignment of a pointer in practice, but the intent is more clear.
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:2027
          "vbtable with this name already exists: mangling bug?");
+  unsigned Align = CGM.getClassPointerAlignment(RD).getQuantity();
   llvm::GlobalVariable *GV =
----------------
This is an array of `int`.
https://reviews.llvm.org/D51416
    
    
More information about the cfe-commits
mailing list