================ @@ -1816,6 +1816,15 @@ class CodeGenModule : public CodeGenTypeCache { void requireVectorDestructorDefinition(const CXXRecordDecl *RD); bool classNeedsVectorDestructor(const CXXRecordDecl *RD); + // Helper to get the alignment for a variable. + unsigned getGlobalVarAlignment(const VarDecl *D = nullptr) { + LangAS AS = GetGlobalVarAddressSpace(D); + unsigned PAlign = getItaniumVTableContext().isRelativeLayout() + ? 32 + : getTarget().getPointerAlign(AS); + return PAlign; + } + ---------------- CarlosAlbertoEnciso wrote:
Changed function name to `getVtableGlobalVarAlignment`. https://github.com/llvm/llvm-project/pull/130255 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits