aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index c87b08627d..4a3f00f356 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -263,7 +263,7 @@ const llvm::fltSemantics &ASTContext::getFloatTypeSemantics(QualType T) const {
/// getDeclAlign - Return a conservative estimate of the alignment of the
/// specified decl. Note that bitfields do not have a valid alignment, so
/// this method will assert on them.
-unsigned ASTContext::getDeclAlign(const Decl *D) {
+unsigned ASTContext::getDeclAlignInBytes(const Decl *D) {
// FIXME: If attribute(align) is specified on the decl, round up to it.
if (const ValueDecl *VD = dyn_cast<ValueDecl>(D)) {
@@ -275,7 +275,7 @@ unsigned ASTContext::getDeclAlign(const Decl *D) {
while (isa<VariableArrayType>(T) || isa<IncompleteArrayType>(T))
T = cast<ArrayType>(T)->getElementType();
- return getTypeAlign(T);
+ return getTypeAlign(T) / Target.getCharWidth();
}
return 1;