diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 1db5c3b..1b67d43 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1810,6 +1810,15 @@ public: return !getLangOpts().CPlusPlus; } + // Helper to get the alignment for a variable. + unsigned getVtableGlobalVarAlignment(const VarDecl *D = nullptr) { + LangAS AS = GetGlobalVarAddressSpace(D); + unsigned PAlign = getItaniumVTableContext().isRelativeLayout() + ? 32 + : getTarget().getPointerAlign(AS); + return PAlign; + } + private: bool shouldDropDLLAttribute(const Decl *D, const llvm::GlobalValue *GV) const; |